What we have to do if input is variable each time and on the bases of that input we have to again make another operation on that output of first command. please refer below example.
suppose I executed x command on terminal and it gives me output as below (space separated):
abc efg hij klm nop qrs uvw
abc efg hij klm qrs uvw
Sometimes there are 6 columns and sometimes there are 5 columns.
I pipe this output to awk command to print the 6th column i.e. qrs
, it returns the correct result in the 1st case but in second case it shows uvw
.