LoginSignup
0
0

More than 5 years have passed since last update.

複数のテキストファイルに対してgrepをかけた時にファイル名と行番号を出す方法

Last updated at Posted at 2016-10-18

を参考に、以下でできた。

$ ls |xargs -I XXX grep -n 'searched_string' XXX /dev/null

※追記

...と思ったら、以下で良いんですね。どや顔で載せた記事もしっかり読んでおらず、恥ずかしいです。。笑

$ grep 'searched_string' *
0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0