Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old May 17th, 2002, 11:52 AM
Dreidle Dreidle is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 10 Dreidle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question cut, grep, regex, universal search and replaces

Is there a GUI program out there for the use of grep, cut, regex, and I need a powerful search and replace program ... Any ideas would be greatly appreciated!

ThankS!

Reply With Quote
  #2  
Old May 17th, 2002, 01:40 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
grep and cut are powerful search programs. for search and replace, you should use sed, awk or perl. i doubt there is a gui. and if, probably you´ll get like less than 1% of the power that they have!

learn how to use the command line, there is no more effective way.

have a look at bash programming too, it´s easy

some hints:

grep "text" * is "find text in all files in the current directory."
grep -i "text" * is "find text in all files in the current directory and don´t care about upper/lower case
ls -lR / | grep -i .jpg is "find all jpg-files on the filesystem no matter if their extension is jpg, JPG, jPg or ..."

and one to sleep a night about (bash,sed,cat):

for i in *; do cat "$i"|sed -e s/war/peace/ig >/tmp/tmpfile; cat /tmp/tmpfile > "$i"; done; rm -f /tmp/tmpfile

what does it do?
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #3  
Old May 17th, 2002, 05:23 PM
justice41 justice41 is offline
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Emerald City
Posts: 289 justice41 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
sorry to drag politics into the group but i couldn't resist ...
Quote:
for i in *; do cat "$i"|sed -e s/war/peace/ig >/tmp/tmpfile; cat /tmp/tmpfile > "$i"; done; rm -f /tmp/tmpfile

what does it do?

my guess is that this will remove the georGeW32busH@mm virus from your computer.

jaa

Reply With Quote
  #4  
Old May 17th, 2002, 06:03 PM
phoenix_rizzen phoenix_rizzen is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Kamloops, BC, Canada
Posts: 55 phoenix_rizzen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Bah, who wants to replace war with peace? What would we do for excitement then? Could we at least replace war with "mini-battles" or something similar??
__________________
Linux is for those who hate Windows.
FreeBSD is for those who love UNIX.
-------
Have you read The Handbook yet?
How about The FAQ?
Have you searched the mailing lists?
Or read any of the man pages?
Have you searched the web for BSD resources?
In short, have you done your homework yet?

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > cut, grep, regex, universal search and replaces


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway