1

AWK FS with ignore space option

view story
linux-howto

http://www.unix.com – Hi, i have in a situation to get the variables which are having a "|" delimiter and each variable may or may not have spaces, so how can i skip the spaces on the string and print the string as it is. For example: line = "|Hello world|Hello|Hi Guys| read x y z <<<$(echo "$line" | awk -F"|" '{print $1,$2,$3}') echo -e "$x" (should be 'Hello world') buts it's printing only Hello. Could some one please help me. (HowTos)