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 UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 01-30-2008
udiptya udiptya is offline
Registered User
 

Join Date: Jan 2008
Posts: 24
Question Help required on Shell Programming!

I have a file named "file1" with contents as shown below:

name(abc) age(123)
empid(a123) degree(graduate)
.
.
.
.

Now suppose I know that the format of my file is as above but I don't know the contents within () ie. as if the file to me is like this
name(???), age(???) etc. How do I extract the contents within () and store it in a variable?
Please help me if possible with a sample code!
Reply With Quote
Forum Sponsor