Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-27-2005, 01:41 AM   #1
Registered: May 2005
Distribution: Slack, FreeBSD,NetBSD, OpenBSD, Open Solaris, Minix
Posts: 172

Rep: Reputation: 30
Bash scripting

Okay, say I wanted to search the elements in an array for two characters ".." and say I'd like to replace them with other characters (something like the first half of a URL, how would I go about this? I was thinking of something like this

for x in ${LIST[@]}### That's the equivalent of foreach in perl no?
then something like awk?

Any help is appreciated.
Old 09-27-2005, 02:48 AM   #2
Registered: Dec 2002
Location: Bucharest,RO
Distribution: debian etch, sarge and sid
Posts: 407

Rep: Reputation: 30
for variabile [in val1, val2 ...]
do instruction_list


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
bash scripting.. kurrupt Programming 3 09-21-2005 01:07 AM
BASH If-then-else Scripting Help xianzai Programming 4 10-29-2004 05:09 AM
Bash scripting Gunslinger_ROL Programming 5 09-28-2004 12:37 PM
Bash scripting JonCooperUK Programming 3 03-04-2004 09:55 PM
Bash scripting kbeaver Programming 5 07-18-2003 09:35 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:58 PM.

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
Open Source Consulting | Domain Registration