View Single Post
Posts: 89 | Thanked: 48 times | Joined on Dec 2009 @ Glasgow
#16
Originally Posted by extendedping View Post
I thought any time you needed to get the value from a variable you had to use echo? no I guess not.
No, you don't have to (although, clearly it works). I use echo primarily to view the contents of a variable, or just to print status messages in my scripts. Another more advanced way to use it is to pipe one variable into another. Try this:

Code:
foo="hello cruel world"
echo $foo | awk '{print $1,$3}'
I will investigate your awk command further, I know a tiny about it but know it is its own programming language and am scared to even look at the chapter on it in my book
Take your time with it