The UNIX and Linux Forums  

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




Thread: sed command
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 06-05-2008
jaduks's Avatar
jaduks jaduks is offline
Registered User
  
 

Join Date: Aug 2007
Location: Assam,India
Posts: 167

Code:
$ eval $(echo "sadaskjer4x5sdfrsdf" | sed 's/[a-z].*\([0-9]x[0-9]\).*/\1/'| awk -F"x" '{print "first="$1";second="$2}')

$ echo $first
4

$ echo $second
5

//Jadu