Rename job

Rename job

Post by Ard » Sun, 08 Jul 2001 17:42:53



Hello all,

I would like to rename the extension of a lot of files in one dir but
ofcourse not all by hand.

I've seen this little script but it takes the whole file.ext and put the
new extension behind it. What should i change to make it work so it really
renames the file ?

for i *
do
mv $i $i.jpg
done

Thanks,

--
 10:38am  up 14 days, 16:26,  1 user,  load average: 0.02, 0.04, 0.01

 
 
 

Rename job

Post by Brian K Ivin » Mon, 09 Jul 2001 01:41:11


assuming bash:

for file in *
do
  mv $file ${file%%.*}.jpg
done


Quote:> Hello all,

> I would like to rename the extension of a lot of files in one dir but
> ofcourse not all by hand.

> I've seen this little script but it takes the whole file.ext and put the
> new extension behind it. What should i change to make it work so it really
> renames the file ?

> for i *
> do
> mv $i $i.jpg
> done

> Thanks,

> --
>  10:38am  up 14 days, 16:26,  1 user,  load average: 0.02, 0.04, 0.01


 
 
 

Rename job

Post by Ard » Mon, 09 Jul 2001 03:06:47




> assuming bash:
> for file in *
> do
>   mv $file ${file%%.*}.jpg
> done



Thanks ! Works like a charm

--
  8:05pm  up 15 days,  1:53,  2 users,  load average: 0.05, 0.04, 0.00

 
 
 

1. Jobs, Jobs, Jobs And More Jobs!!!

I am a technical recruiter in New York City.  I have over 100 jobs that I need to fill as soon as possible.  I work for a 50 million dollar wholly-owned subsidiary of a parent company worth over 1.7 billion dollars.

All this really means is that I have the capability to keep a consultant working and working and working, much like the Duracell Rabbit!

I have needs for the following openings:

Any Ramis or Focus skilled people
BAL/CICS
VB/SQL Server
C/OS2/Unix (enhance and development position
Jr. VB with any education in C++
Lotus Notes Person
An OLE Guru!
C++, Sybase, with Orbix, x-Motif being a Plus!!
Tuxedo Oracle Person
Cobol, CICS, DB2, with Reporting Skills, Insurance Background is a plus!
Any Sybase DBA(s) (the more the merrier, we have lots of openings!)
PL1, PL1, PL1, PL1, PL1, PL1 and, please, more PL1!!!!! with IMS please
Peoplesoft person to lead a JAD team
Cobol, IMS, DB/DC, CICS
Any Internet Firewall Specialists, Come a a 'runnin'
Fortran, VAX/VMS person
Visual Basic Sybase
DCE Encina
ANYONE WITH BANKING, BROKERAGE AND FINANCIAL BACKGROUND IS WELCOME!!
Latin American Banking Specialist with technical knowledge
Sybase XA, Corba, Object Request Broker DCE, SNARE Web Access, Java, C++
Cobol, JCL, DB2
C/Unix/Fixed Income
Senior Cobol JCL, Excel
FoxPro Analyst
C/Unix/Sybase
Informix DBA
Any Testers!!!
Endevor People!
Unix, Informix, Sun Solaris

My company was listed in the top 500 fastest growing companies three years running.  We offer
extremely high hourly pay and an option to purchase health beneifits.  Call me, Laura, at 800-229-0704 Ext. 117, and let's
discuss your careerpath and salary requirements. (People who want to work in New York City Need Only Respond)  We help
with relocation expenses.

Come and see what you are really worth!  Call today!

2. HELP: New kernel won't boot

3. PPTP VPN

4. midnight commander binary for 2.6sparc

5. ProFTP -> Port XXX refused (address mismatch)