Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Other *NIX Forums > Other *NIX
User Name
Other *NIX This forum is for the discussion of any UNIX platform that does not have its own forum. Examples would include HP-UX, IRIX, Darwin, Tru64 and OS X.


  Search this Thread
Old 04-07-2009, 07:23 PM   #1
LQ Newbie
Registered: Apr 2009
Distribution: Crunchbang
Posts: 4

Rep: Reputation: 0
Search and Replace in bash script

Hello. I'm looking for some advice on a bash script I'm writing for Mac OSX. The script is replacing a line of html code to change a image name to that of the image in the directory. There can be up to three images in each directory (125 of them). Is there a way to do a find and replace?
Old 04-08-2009, 01:24 AM   #2
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,703

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Have a look at the "sed" command.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does anyone know of a bash script can search & replace txt in a file. jimwelc Linux - Newbie 6 09-15-2008 12:13 AM
Bash search and replace utility cpedros Programming 3 03-12-2008 01:02 PM
Search and Replace from bash hammertime1983 Linux - Newbie 4 11-02-2007 03:18 PM
Trying to make a script that will search and replace text in a file Jongi Programming 28 07-08-2007 12:37 PM
Need a script to search and replace text in file using shell script unixlearner Programming 14 06-21-2007 10:37 PM > Forums > Other *NIX Forums > Other *NIX

All times are GMT -5. The time now is 06:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration