Hi
I am downloading some files from the Internet. They are from different sources and they are all called
that is: a dash "-" followed by a dot "." and then the file extension.
So i wrote a small script that hoped will downloads the first file and then rename them once they are completely downloaded. Here is the script I wrote:
but what I get is that the script (above) downloads the first file "-.txt" and does not rename it to 1.txt as I wanted, and so keeps giving me the message that file "-.txt" has already been downloaded.
What is wrong in my script? (I have little experience with scripting in bash)
Thank you
I am downloading some files from the Internet. They are from different sources and they are all called
Code:
-.txt
So i wrote a small script that hoped will downloads the first file and then rename them once they are completely downloaded. Here is the script I wrote:
Code:
#!/bin/sh
for i in `seq 1 1 30`
do
wget url
mv ./-.txt $i.txt
done
What is wrong in my script? (I have little experience with scripting in bash)
Thank you