I have the following code:
#!/bin/sh
uname=`awk 'NR>1{print $1}' foo.txt`
echo $uname
If I execute the command awk 'NR>1{print $1}' foo.txt by itself, I get the following format:
abc123
Apple
Test
When I save the command as a variable and echo it, the output becomes:
abc123 Apple Test
How would I go about making sure the output of $uname will be in the first output form listed above?