I know this is an awk forum, however I know many of you know sed fairly well and there isn't a sed forum on tek tips -- so if anybody could help me out I would appreciate it.
I'm trying to run one instance of sed instead of using piping. This is what I got so far ...
However, this produces the following below... (It doesn't remove whitespace from the beginning of the line and it doesn't remove "(FROZEN)".
U03784 (FROZEN)
U03057 (FROZEN)
U00994 (FROZEN)
U03073 (FROZEN)
U00989 (FROZEN)
U00961 (FROZEN)
U00990 (FROZEN)
U00988 (FROZEN)
...but when pipe sed to sed then it works.
I get the following:
U03784
U03057
U00994
U03073
U00989
U00961
U00990
U00988
U02379
U02999
U00991
U00993
U03029
U00992
What am I missing ?
Thanks
I'm trying to run one instance of sed instead of using piping. This is what I got so far ...
Code:
bpmedialist -summary | sed -n -e 's/U[0-9]/&/p' -e 's/(FROZEN)//g' -e 's/^[ \t]*//' | more
However, this produces the following below... (It doesn't remove whitespace from the beginning of the line and it doesn't remove "(FROZEN)".
U03784 (FROZEN)
U03057 (FROZEN)
U00994 (FROZEN)
U03073 (FROZEN)
U00989 (FROZEN)
U00961 (FROZEN)
U00990 (FROZEN)
U00988 (FROZEN)
...but when pipe sed to sed then it works.
Code:
bpmedialist -summary | sed -n 's/U[0-9]/&/p' | sed -e 's/(FROZEN)//g' -e 's/^[ \t]*//' | more
I get the following:
U03784
U03057
U00994
U03073
U00989
U00961
U00990
U00988
U02379
U02999
U00991
U00993
U03029
U00992
What am I missing ?
Thanks