Reputation: 377
I have a scp file that contains the paths to the various audio files. Say the scp file is file.wav.scp
and it contains these paths
/home/red/audio1.wav
/home/blue/audio2.wav
/home/red/audio3.wav
/home/blue/audio4.wav
/home/blue/audio5.wav
I am using the grep "blue" file.wav.scp
to find the paths which has the blue
keyword in it. Now is there any way to store these outputs in a file directly from grep's
output?
Upvotes: 0
Views: 81
Reputation: 17844
Use grep "blue" file.wav.scp >outputfile
.
This is called I/O redirection and is an essential concept in shell usage and programming.
Upvotes: 1