Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.


Help required with a file rename shell script


Login or Register to Reply

 
Thread Tools Search this Thread
# 8  
The probelm with a *${var}_* glob is that it is missing a leading anchor.
E.g. $var==2795 will match 002795_001.jpg and 012795_001.jpg Smilie
Reason enough to go for the less efficient but correct `ls | grep` and a ^0* anchor in the RE.
This User Gave Thanks to MadeInGermany For This Post:
# 9  
Thanks to everyone, great solutions, and discussion. I'll try all of these out and let you know if I need any further help. I'll also post here my modified script which will go into production. Apologies again for the initial confusion. Have a great day ahead.
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
write shell script to rename file
shubhig15
hi, I need some help in writing shell script in a bourne shell.I am trying to rename the file.. eg. find /root/data -type f -name "text*) | while read FILES do newfile=${FILES/type_2.0_20101208_34.xml / tmp.xml} mv "$FILES" "$newfile" done above written script is working...If the...... Shell Programming and Scripting
7
Shell Programming and Scripting
Rename a file to a file_current datetime in a shell script
Nithin
Hi all, Could anyone suggest me on Renaming a file to a file_current datetime in a shell script.... UNIX for Advanced & Expert Users
3
UNIX for Advanced & Expert Users
Shell script to rename or change file extension case.
Sheldon
I searched the forum, but there was different type of rename. Hello. I have files in folder. Like: xxxxxxxx1.html or xxxxxxxx2.txt or xxxxxxxx3.tar.gz and how to rename or change file extension case to xxxxxxxx1.htm or xxxxxxx2.TXT or... UNIX for Dummies Questions & Answers
5
UNIX for Dummies Questions & Answers
shell script required
sethunath
hi , i need a shell script that will remove the first and second lines of the text file and will list the word count of the characters present in it. the text file will be consisting of multiple textfiles.the first text file starts from 01-34.like wise the next file also starts from 01-34...... Shell Programming and Scripting
4
Shell Programming and Scripting
Urgent help required in deleting a line without opening a file usinga shell script
naan
Hi, I need a help in deleting a line matching a particular pattern in a file using shell script without opening the file. The file is a .c/.cpp file. Is it possible? Thanks... Shell Programming and Scripting
6
Shell Programming and Scripting

Featured Tech Videos