|
When i use the code:
echo "Please enter your full name:"
read name
echo $name | awk '{print"Hello Mr." $2}'
And enter a first middle and surname e.g. john bloggs smith then it outputs 'Hello Mr. bloggs' instead of 'Hello Mr. smith'.
And if i use the code:
echo $name | awk '{print"Hello Mr." $0}'
And enter a first middle and surname e.g. john bloggs smith then it outputs 'Hello Mr. john bloggs smiths' instead of 'Hello Mr. smith'.
AHHH lol. Thanks very much for all your help
Last edited by kazazza; 12-30-2008 at 05:39 PM..
|