how to split a string and extract columns in Unix -
suppose have strings :
au sujet de l article card -> advice rule (0.000000082860230) au sujet de l article card -> therefore (0.000000082860230)
in general :
6 words -> n words (value)
i m searching idea extract 6 words value example
au sujet de l article card 0.000000082860230 au sujet de l article card 0.000000082860230
any idea please?
many thanks
sounds job awk
:
echo "$line" | awk '{ value=$nf; gsub(/[\(\)]/,"",value); print $1,$2,$3,$4,$5,$6,value }'
this prints first 6 fields, , last field after removing parentheses via regexp.
Comments
Post a Comment