10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
What is wrong with this script to rename batch of similar files? For example renaming all *.txt files to *.tab .
$ for i in seq {01..10}; do touch ${i}.txt; done
$ ./rename.sh *.txt txt tab
Error:
mv: ‘01.txt’ and ‘01.txt’ are the same file.
Code is:
#!/usr/bin/bash
# renames.sh
#... (6 Replies)
Discussion started by: yifangt
6 Replies
2. Shell Programming and Scripting
Hello,
I have below script, which connects to ftp server, pull a file and then it renames it after deleting previous day file. This was working before but now it is not able to rename 'Red_bill.txt' to `Red_bill.V01.txt`. If I run manually 'rename Red_bill.txt Red_bill.V01.txt', I am able to... (5 Replies)
Discussion started by: solaris_1977
5 Replies
3. UNIX for Dummies Questions & Answers
How to find how many parameters are required to run a Perl script? (1 Reply)
Discussion started by: Lakshman_Gupta
1 Replies
4. UNIX for Dummies Questions & Answers
Hi There
I am looking at writing a script that I can run from a cron job (say every month) that will copy my existing scripts to another folder, then in THAT new folder, append them all with the extension of .txt
I have the cp command down pat (cp /existing_folder /new_folder)
however I am... (6 Replies)
Discussion started by: orangepeel
6 Replies
5. Shell Programming and Scripting
Hey all!
Sorry for the noobish question..
I am wondering how to I copy multiple files, and rename them based on their directory at once.
So, I have files like this
/logs/server/2011-10/server-1/log/file/folder/some.log.gz
/logs/server/2011-10/server-2/log/file/folder/some.log.gz... (3 Replies)
Discussion started by: m3power206
3 Replies
6. Shell Programming and Scripting
Dears,
I need your help!
I got a problem and found some workaround solution but I donno how to realize it.
I have a number of files (about 300 each day) and I need them to be renamed. All these files has fixed number of letters and name looks like this one:... (7 Replies)
Discussion started by: nypreH
7 Replies
7. Shell Programming and Scripting
I wanna back up the original version of files in a directory by appending .ORIG to them. I'm guessing I'd need CP and AWK in some form or fashion. Can someone give me a template? Thanks (3 Replies)
Discussion started by: stevenswj
3 Replies
8. Shell Programming and Scripting
hi i have a folder full of files. some of the names are quite off because the dimensions were the same and i had to put a 'b' after the initial number so that it didnt overwrite. what i want is a script in unix to overwrite the filwe name leaving some of the title intact, e.g. below are some... (3 Replies)
Discussion started by: shabs1985
3 Replies
9. Shell Programming and Scripting
I'm doing a short batch script to compile po files producing output binary mo files.
The compilation command is:
msgfmt -o file.mo file.po
so in order to compile I am appending .mo to the varible in a loop.
It goes something like this:
for i in `find . -name "*.po"`
do
echo... (2 Replies)
Discussion started by: Breen
2 Replies
10. Shell Programming and Scripting
iam looking for a PERL script to goto a folder and rename all the files in it.can some one help me please? (20 Replies)
Discussion started by: perleo
20 Replies