[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
would you give me a hand with a simple 'if' bash script?
From: |
hawa |
Subject: |
would you give me a hand with a simple 'if' bash script? |
Date: |
Thu, 13 Mar 2008 13:33:09 -0700 (PDT) |
Execuse me, would you give me a hand with a simple 'if' bash script?
I want to make folders "00", "01",...,"20" and
copy existing files file_00, file_01,....,file_20 to each folder.
Thank you very much.
-------------------------------------
for (( i = 1 ; i <= 20; i++ ))
do
if [ $i -gt 10 ]; then foldername = $i
filename = "file_"
filename = $filename$i
else
foldername = "0"$i ##
filename ="file_0" ##
file = $filename$i ##
fi
done
--
View this message in context:
http://www.nabble.com/would-you-give-me-a-hand-with-a-simple-%27if%27-bash-script--tp16037981p16037981.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.
- would you give me a hand with a simple 'if' bash script?,
hawa <=