| Author |
Message |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 02/09/2009 11:46:13
|
chandu2708
Joined: 30/08/2009 08:25:09
Messages: 8
Offline
|
Hi There,
Did any one tried similar stuff. if so please share the details.
Thank you,
bala.
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 03/09/2009 14:38:46
|
fred_kuijper
Joined: 24/01/2008 22:08:39
Messages: 35
Location: The Netherlands
Offline
|
Hi Bala,
Maybe you should explain to window users that you want countryinfo.txt without comment lines. Isn't there a grep for windows, btw?
Fred.
|
Fred Kuijper
The Netherlands |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 10/09/2009 06:29:16
|
chandu2708
Joined: 30/08/2009 08:25:09
Messages: 8
Offline
|
Hi Fred,
Thx for the reply. i dont think there is a grep option availabel in Windows. there are some programs i can use which stimulates the grep command but that setp is a bit complex.
Thank you,
bala.
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 10/09/2009 08:08:59
|
chandu2708
Joined: 30/08/2009 08:25:09
Messages: 8
Offline
|
I downloaded cgwin. not things are fine. thx for the help.
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 11/09/2009 11:18:31
|
cancausecancer
Joined: 11/09/2009 11:12:34
Messages: 4
Offline
|
You don't need to execute that cat | grep on Windows.
What the command does is go thru countryInfo.txt and copy each line into countryInfo-n.txt with the exception of lines which start with #. So it is just removing the comment lines. You can do this manually in a text editor.
If you want a break down of what is happening, cat is outputting the text file,
^# means 'where first character is #'
-v means 'do opposite'
grep is searching,
> countryInfo-n.txt means pipe the output into a file
So in affect, its listing the file, searching for lines not starting with # and outputting them into another text file.
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 11/09/2009 16:40:41
|
fred_kuijper
Joined: 24/01/2008 22:08:39
Messages: 35
Location: The Netherlands
Offline
|
Hi Bala,
I think that you should try something like this: http://gnuwin32.sourceforge.net/packages/grep.htm
I can't test it since I no longer run Windows but it looks good to me.
|
Fred Kuijper
The Netherlands |
|
|
 |
|
|