The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: awk on a string
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 07-24-2008
mph mph is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 58
For a string try this:


Code:
assuming: var="a:b:c"
echo "$var" | awk -F: '{print $3}'