Aswex
February 3, 2011, 8:17am
1
Hello,
I am looking for help to minimize this commande line. The commande is working fine but I tried to make it shorter ... It's about to get rid of some characters.
| sed '/NODE*/d' | cut -d "'" -f 2 | sed '/;;/d' | sed '/
[*]/d' | sed 's/[ ]//g'
Thanks for your help
what is your input (format) / output expected?
Aswex
February 3, 2011, 9:50am
3
Hello Tytalus,
here is the output format :
;;
NODE='/OPERATIONNEL/SATURNE/PHYS_MOD/NOWCAST ';;
FILE='/OPERATIONNEL/SATURNE/PHYS_MOD/NOWCAST/SATURNE_1DAV_20110119_20110120_GRIDKZLN10_R20110126.NC.GZ ';;
Here is what I am lokking for
/OPERATIONNEL/SATURNE/PHYS_MOD/NOWCAST/SATURNE_1DAV_20110119_20110120_GRIDKZLN10_R20110126.NC.GZ
Thanks
Tytalus
February 3, 2011, 10:02am
4
how about:
# nawk -F"'" '/FILE=/{gsub(" ","",$2);print $2}' infile
/OPERATIONNEL/SATURNE/PHYS_MOD/NOWCAST/SATURNE_1DAV_20110119_20110120_GRIDKZLN10_R20110126.NC.GZ
1 Like
Aswex
February 3, 2011, 10:09am
5
Your a real master. Thank you so much ...
rdcwayx
February 4, 2011, 12:26am
6
awk -F"[' ]" '/FILE=/{print $3}' infile
One way through sed..
sed -n "/FILE/s/.*'//p" inputfile > outfile
rdcwayx
February 4, 2011, 12:50am
8
there are some spaces in the end of line.
I did'nt get you. Please point out the bug part..