unix - AWK Include Whitespaces in Command -


i have string: "./delivery note.doc 1" , where:

$1 = ./delivery $2 = note.doc $3 = 1 

i need execute sum command concatenating $1 , $2 keeping white space (./delivery note.doc). try trim whitespaces:

| '{ command="sum -r "$1 $2"  

result: ./deliverynote.doc

to execute sum command

echo  "./delivery note.doc 1" | awk '{ command="sum -r \""$1" "$2"\""; print command}' | bash 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -