Huggy
12-08-2001, 12:57 PM
I get perplexed with the use of the backets and the tic's I'm not sure when to use which one or for what. can you please help me out.
Ok whats the deal with the { [ ( and " ' `
Start with the { [ (
whats the difference? where would you use one set as opposed to the other. and what are they really say to the program for example I copied this one out.
It shows all the ( { [ and the fast run by of this program is it scans the current dir for any .bsh file and echo them to the standered out, the screen as .txt but no changes or copies are made to the .bsh file.
#!/bin/bash
for src in $(echo *)
do
targ=$(echo $src | gawk -F"." '/.*[.]bsh/ {print $1".txt"}')
if [ $targ ]
then
echo cp $src $targ
fi
done
Ok whats the deal with the { [ ( and " ' `
Start with the { [ (
whats the difference? where would you use one set as opposed to the other. and what are they really say to the program for example I copied this one out.
It shows all the ( { [ and the fast run by of this program is it scans the current dir for any .bsh file and echo them to the standered out, the screen as .txt but no changes or copies are made to the .bsh file.
#!/bin/bash
for src in $(echo *)
do
targ=$(echo $src | gawk -F"." '/.*[.]bsh/ {print $1".txt"}')
if [ $targ ]
then
echo cp $src $targ
fi
done