LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Bash scripting (https://www.linuxquestions.org/questions/programming-9/bash-scripting-367387/)

pete1234 09-27-2005 01:41 AM

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.

pe2338 09-27-2005 02:48 AM

Code:

for variabile [in val1, val2 ...]
do instruction_list
done



All times are GMT -5. The time now is 01:47 AM.