The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: Awk Command
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 12-28-2008
kazazza kazazza is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 9
Awk Command

Hi, ive got this piece of script:

echo "Enter your full name" (i.e. first and last name)
read name
echo "Hello Mr.(last name only)

How do i split the string so that it says hello and then only displays the surname entered? The user has to be able to enter their name all on one line. i know im meant to use the awk command but im a noob at this. Any help you can give me would be very much appreciated. Thanks, Phil