we can easily to capture the first field by awk as this syntax
capture=` echo 1 2 3 | awk '{print $1}' `
we can easily to capture the sec field by awk as this syntax , and so on
capture=` echo 1 2 3 | awk '{print $2}' `
but I prefer to avoid to use echo just to capture the requested field
what is the same results with bash ?
my goal is to do it more simple and if we can not use echo - then its better
capture=1
, the second bycapture=2
. You see the problem? We need to know what the source of the data is to give the matching answer. Of course it's useless toecho
a string just to modify it. So what do you really want to do?