The UNIX and Linux Forums  

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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 01-31-2008
udiptya udiptya is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 24
hey manas,

I didn't understand why the while loop is required?

I tried the following way. It isn't giving any error but no outputs also

x=`nawk -F 'NR == 1 {print $1}' | sed 's/^.*(\(.*\))/\1/'`
echo "$x"


The nawk part is working. I have checked it with echo command. So the input to sed is something like name(abc).

Can you please clarify where I am going wrong?