The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 01-24-2008
fpmurphy fpmurphy is offline
Moderator
 

Join Date: Dec 2003
Location: /dev/fl
Posts: 1,122
Code:
echo "XXXX.12345.YYYY" | awk -F. '{print $1"."$2}'
or

Code:
echo "XXXX.12345.YYYY" | awk -F. '{printf("%s.%s", $1, $2)}'
Reply With Quote