Member Panel


Sponsors and Ads

Join the Team

Live Tag Cloud

PC Forum PC Help Forum » Operating Systems » Windows Server » [Resolved] Command line text editing in windows (like grep)

Windows Server - [Resolved] Command line text editing in windows (like grep) posted in the Operating Systems forums; Hi In windows 2003 or xp is there a way where I can have an input file abd extract only certain lines from it? example input file has the following ...

JOIN US NOW to remove these Ads

Post New Thread  Reply
  #1  
Old 03-15-2007
Bronze Member
 
Join Date: Mar 2007
Posts: 4
masterp2007 - See this Members User comments on their Profile page
Default [Resolved] Command line text editing in windows (like grep)

Hi

In windows 2003 or xp is there a way where I can have an input file abd extract only certain lines from it?

example input file has the following
::LAPC1
machine is big
very heavy
::LAfileshare
small machine
where are my mp3s
what is on this



I would like to extract everything that start with :: and delete or ignore the rest.
I would do it by hand but there is a smarter way Im sure. I looked on the internet and everything points to using emacs, grep, etc, but I need it for windows not unix, linux.

thanks


  #2  
Old 03-15-2007
madmonkey's Avatar
Site Manager
My PC
 
Join Date: Oct 2006
Location: South Wales
Posts: 5,821
PC Experience: PC Basket Ball Head!
madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page
Default

Hi master,

Welcome to PCHF.

Answer is No! This is more of a development area's. Theres a lot you can do with DOS batch files, but this is just slightly out of it's league. Something like Pascal would do this easy, or you may be able to find a third party utility.

What's the purpose of this if you don't mind me asking, it may give me a better idea of what your trying to achive?


__________________

  #3  
Old 03-15-2007
Bronze Member
 
Join Date: Mar 2007
Posts: 4
masterp2007 - See this Members User comments on their Profile page
Default

hi
thanks for answering


I have a list of servers.
Instad of extracting the servernames by hand, or rewriting them
I wanted to extract the names from the list, so then I could use those names to run batch files.

after logging in and out all constantly, I figured ill give batch files a try


  #4  
Old 03-15-2007
madmonkey's Avatar
Site Manager
My PC
 
Join Date: Oct 2006
Location: South Wales
Posts: 5,821
PC Experience: PC Basket Ball Head!
madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page
Default

You want to extract the names by manually adding a :: before the server name, and letting the batch file pick out those names? Do you edit this document from within Windows? If so, I think I have an alternative method.


__________________

  #5  
Old 03-16-2007
Bronze Member
 
Join Date: Mar 2007
Posts: 4
masterp2007 - See this Members User comments on their Profile page
Default

HI,
thanks, I actually gave it to one of the programmers today, I wanted to extract the server names.
He used grep and extracted the names onto a file.

It was grep for windowss (cygwin)


  #6  
Old 03-16-2007
madmonkey's Avatar
Site Manager
My PC
 
Join Date: Oct 2006
Location: South Wales
Posts: 5,821
PC Experience: PC Basket Ball Head!
madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page madmonkey - See this Members User comments on their Profile page
Default

cygwin - a third party util?

No problem master, will mark this one as resolved.


__________________


Reply
Satellite TV on your PC - over 3000 Channels! Click Here!

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT +1. The time now is 11:33 AM.
Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC7
All Graphics & Content Copyright © 2004-2008 - PC Help Forum.com


Back to Top
Loans
Loans information and advice from money expert.

Free Articles Directory About Cancer
Free Articles Directory About Cancer

Credit Cards UK
Advice from the credit card experts at moneyexpert.com