先頭から50文字と、末尾から50文字を、「...」で省略しながら表示。
grep 'pattern' filename | awk '{print substr($0, 1, 50) "..." substr($0, length($0) - 50, length($0))}'
Go to list of users who liked
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))}'
Register as a new user and use Qiita more conveniently
Go to list of users who liked