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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -