#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Posts
    10
    Rep 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!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    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?
  4. #3
  5. No Profile Picture
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Location
    The Emerald City
    Posts
    289
    Rep Power
    13
    sorry to drag politics into the group but i couldn't resist ...
    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
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    Kamloops, BC, Canada
    Posts
    55
    Rep Power
    13
    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?

IMN logo majestic logo threadwatch logo seochat tools logo