[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: would you give me a hand with a simple 'if' bash script?
From: |
Bob Proulx |
Subject: |
Re: would you give me a hand with a simple 'if' bash script? |
Date: |
Thu, 13 Mar 2008 22:34:07 -0600 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
hawa wrote:
> 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.
Something like this (UNTESTED):
for n in $(seq -w 0 20); do
mkdir $n
mv file_$n $n/
done
Or did you mean to copy all files to each folder?
for n in $(seq -w 0 20); do
mkdir $n
cp file_* $n/
done
Bob