cut -d" " -f2 ${2} | $callsTo
hello, can somebody please explain can I pipe the result of cut to variable callsTo, and how will it be stored, as the string or list?
cut -d" " -f2 ${2} | $callsTo
hello, can somebody please explain can I pipe the result of cut to variable callsTo, and how will it be stored, as the string or list?
It will call the command stored in $callsTo
and send the standard output of cut
to the standard input of said command as a string.
POSIX shell: - bash ksh
echo "${2}" | cut -d" " -f2 | read $callsTo
or
callsTo=$(echo "${2}" | cut -d" " -f)
This assumes that the #2 parameter is a string with spaces in it.
I do not see how what is posted will work.
I misunderstood the orignal post. Completely - disregard this.