Results 1 to 1 of 1
Hello ! I am a novice in shell scripting and I face a simple problem with 'grep' and the documentation doesn't help me the text file I want to process ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-31-2009 #1
- Join Date
- May 2009
[SOLVED] script for text processing (pb with pipe to grep)
I am a novice in shell scripting and I face a simple problem with 'grep' and the documentation doesn't help me
the text file I want to process looks like (every 3 lines are part of a 'block' e.g. lines 11 12 13 form what I call a block) :
line21 blabla1.. DesiredInfo
line31 blabla1.. DesiredInfo
#!/bin/bash #script.sh (while read line; do read line2; read line3; echo $line $line2; done;)
| grep DesiredInfo
bash script.sh < directory/file.txt | grep DesiredInfo
thank you for your precious help !!
I found what the problem was...
actually that pipe worked but it takes so much time (50 sec. !!) to print the output that I thought there was a problem...
Thank you for taking the time to read it anyway !