リストでGrapのコンテンツの一致を制限する方法は? [コピー]

リストでGrapのコンテンツの一致を制限する方法は? [コピー]

私は手がかりを知っていますここただし、いくつかの提案(... | cut -c 80)は単一の文字出力を提供します。例: n r s t pI do

# https://unix.stackexchange.com/a/293147/16920
find -L $(find . -type l -name 'Math*') -name '*.tex' -exec fgrep word /dev/null {} +

一部の試合には内容が多すぎてカットしたいくらいです。他のほとんどの試合は大丈夫ですが、ライナーを持つことは内容の問題です。

...
/Math/16.5.2014.tex:Feedback Control of Hormone SecrAlthough the plasma concentrations of many hormones fluctuate in response to various stimuli that occur throughout the day, all hormones studied thus far appear to be closely controlled. In most instances, word [lot more]
...

ベストアンサー1

パイプライニング結果 [Sato]

find | 
| cut -c -80

または

find ... \
| sed 's/^\(.\{80\}\).*/\1/' 

または

find - \
| perl -lpe 's/^.{80}\K.*//'

正しい出力を提供します。

おすすめ記事