Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2007-08-16T02:53:22Z by James.Zhu
arul_anand_2000@yahoo.com
1 Post
ACCEPTED ANSWER

Pinned topic Script Help

‏2007-06-21T16:38:41Z |
Hi All,

I am trying to extract the values of Student Id information from the file which 1000 of lines of information as below

Student Id,10261.15147,Course,157
Student Id,102.10147,Course,15

Output should be
10261.15147
102.10147

I am struggling to do this. As this is my first exp. in doing Shell script.

I did an grep -o ',0-9.0-9,' filename

i was able to get the following output

,10261.15147,
,102.10147,

But was not able to remove the , in start and end of each line. Can anyone help me to do this.

Thanks in Advance.

Regards,
Arul.
Updated on 2007-08-16T02:53:22Z at 2007-08-16T02:53:22Z by James.Zhu