LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 09-27-2005, 12:41 AM   #1
pete1234
Member
 
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 http://show.com/files), 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, 01:48 AM   #2
pe2338
Member
 
Registered: Dec 2002
Location: Bucharest,RO
Distribution: debian etch, sarge and sid
Posts: 407

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


Reply


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 12:07 AM
BASH If-then-else Scripting Help xianzai Programming 4 10-29-2004 04:09 AM
Bash scripting Gunslinger_ROL Programming 5 09-28-2004 11:37 AM
Bash scripting JonCooperUK Programming 3 03-04-2004 08:55 PM
Bash scripting kbeaver Programming 5 07-18-2003 08:35 PM


All times are GMT -5. The time now is 02:14 PM.

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