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!
|