aav1307
1
Hi All,
Sorrry by basic question but I have many files text plane e.g.
$ls
file1 file2 file3 ..
etc.,
$cat file1
123
244
345
NNN
4234
QQQ
423534
How can read contain each file and find pattern NNN and print in new file output,
$cat newfile
NNN
QQQ
Thanks you,
What is ' file find pattern'?
- a pattern in the file name
- a pattern in the file's data
What is 'new file output'?
- write to a new file
- copy the file to a new location
Please give us a sample input and expected output from the sample input.
1 Like
RudiC
3
If I'm inferring correctly from that not quite specific request, try grep -o "^[A-Z]{3}$" file*