Help us understand the problem. What is going on with this article?

grepで長い行を省略しながら表示

More than 5 years have passed since last update.

先頭から50文字と、末尾から50文字を、「...」で省略しながら表示。

grep 'pattern' filename | awk '{print substr($0, 1, 50) "..." substr($0, length($0) - 50, length($0))}'
takamario
Oh wow. Ruby, JavaScript, Go, GCP
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away