Re: how to change file name in a batch mode?
- From: Dan Espen <daneNO@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 17 Mar 2006 17:58:12 -0500
Vilmos Soti <vilmos@xxxxxxx> writes:
Michael Goerz <news3@xxxxxxxxxxxxxxx> writes:
roy wrote:
I have thousands of files with extension name .php, I want to change
their extension to .cgi.
Is there any easy way to do that on linux?
perl can do the job. Try this:
#!/usr/bin/perl -w
use strict;
my @files = readpipe('ls *.php');
He has thousands of files. There is a chance that with many files
and long names, he will get back "argument list too long".
my @files = glob "*.php" ;
.
- References:
- how to change file name in a batch mode?
- From: roy
- Re: how to change file name in a batch mode?
- From: Michael Goerz
- Re: how to change file name in a batch mode?
- From: Vilmos Soti
- how to change file name in a batch mode?
- Prev by Date: Re: how to change file name in a batch mode?
- Next by Date: Re: Mandriva: Changing range (start) of UIDs and GIDs ? (Ooops! Retry...)
- Previous by thread: Re: how to change file name in a batch mode?
- Next by thread: Re: how to change file name in a batch mode?
- Index(es):
Relevant Pages
|