I have an awk command piped to the output of another command | awk {'print $2,$3'}. When I run this command the output displays the data in columns, of the columns as I would expect
column2 column3
a a
b b
c c
no problems there, but when I add this output to a script and sent it to >> $log the data is not formatted in columns... just normal line text
column 2 output, column 3 output, column 4 output...etc.
This isn't really a problem but would be easier to deal with down the road in the column format. what do I need to change in the script log output to format it in columns?
Here is the command as it is in the script
d=$(COMMAND| awk {'print $2,$3'})
Then sent to the log here
echo $d >> $log