combining multiple sed operations into a single command
Hi,
I would like to combine the following four "sed" commands into a single command so that the "sed" does not have to go through the entire text file (around 1 GB) four times. Code:
sed "/latency/d" $INFILE > tmp; |
Moin,
you can separate different sed commands using the semicolon: Code:
sed '/latency/d;/usecs/d;/exiting/d;/total/d' $INFILE Code:
sed -r '/(latency|usecs|exiting|total)/d' $INFILE |
This could be done in one of two ways.
You could use the | or tee command to pipe the output of one sed command to the next. Alternatively, you could set up a named pipe to input the output of one command to the next. |
Quote:
|
All times are GMT -5. The time now is 05:14 AM. |