I'm using awk to split a binary stream and I can get each part into a for loop like this.
for(i=1;i<=NF;i++)
I don't want to convert each field to text or arguments, but simply pass it directly to a command.
I'm trying to find something like this,
for(i=1;i<=NF;i++) system("decode")
but this obviously doesn't work. decode receives no input.
How do I get decode to receive each field in the loop?
xargs -n1 decode < input_file.txt
might do what you're looking for. Change$IFS
if you don't want to split on white space. – IlllookingIFS=
on a read or making some other mistake. – Laminate