On Thu, 06 Oct 2011 10:57:51 -0300
Eduardo M KALINOWSKI wrote:
Hello Eduardo,
> That looses the trailing zeroes. Try this:
ITYM leading.
--
Regards _
/ ) "The blindingly obvious is
/ _)radnever immediately apparent"
Walking through town is quite scary
I Pr
On Thu, Oct 06, 2011 at 03:35:48PM +0200, Csanyi Pal wrote:
> Hi,
>
> Where can I study perl expressions?
subscribe to beginn...@perl.org mailing list.
perldoc perlre
perldoc perlretut
Happing perling,
Mike
--
Satisfied user of Linux since 1997.
O< ascii ribbon campaign - stop html mail - www
Eduardo M KALINOWSKI writes:
> On 10/06/2011 10:54 AM, Eduardo M KALINOWSKI wrote:
>>
>> Something like
>>
>> rename -n 's/(\d+)/$1+198/e' *.JPG
>>
>> should do the trick, but note that it might match other files.
>
> That looses the trailing zeroes. Try this:
>
> rename -n 's/(\d+)/sprintf("%05d
On Thu, Oct 06, 2011 at 03:35:48PM +0200, Csanyi Pal wrote:
> Hi,
>
> I have a directory with filenames as follows:
>
[cut]
I think what you need is something a little more than just s///. rename
will take any perl expression, which, as the man page says, is expected
to rename $_ (which is a per
On 10/06/2011 10:54 AM, Eduardo M KALINOWSKI wrote:
>
> Something like
>
> rename -n 's/(\d+)/$1+198/e' *.JPG
>
> should do the trick, but note that it might match other files.
That looses the trailing zeroes. Try this:
rename -n 's/(\d+)/sprintf("%05d", $1+198)/e' *.JPG
--
poverty, n.:
On 10/06/2011 10:35 AM, Csanyi Pal wrote:
> Hi,
>
> I have a directory with filenames as follows:
>
> PIC1.JPG
> PIC2.JPG
> ..
> PIC00036.JPG
>
> I want to get renamed those to
> PIC00199.JPG
> PIC00200.JPG
> ..
> PIC00234.JPG
>
> I'm trying to use for this the 'rename' command with perl
On Sun, 5 Jan 2003 21:57:45 -0600
will trillich <[EMAIL PROTECTED]> wrote:
> On Sun, Jan 05, 2003 at 01:19:59AM -0600, Gerald V. Livingston II
> wrote:
> > The script:cat ~/bin/names
> >
> > #!/bin/bash
> >
> > typeset -i a=1
> >
> how about
>
> ls /t/*.jpg /t/*.JPG /t/*.jpeg 2>/dev/null
On Sun, Jan 05, 2003 at 01:19:59AM -0600, Gerald V. Livingston II wrote:
> The script:cat ~/bin/names
>
> #!/bin/bash
>
> typeset -i a=1
>
> if [ `ls /t/*.jpg 2>/dev/null|wc -l` -gt 0 ]
> then for i in /t/*.jpg;
>do mmv "$i" /t/`date +%s`-$a.jpg; a=a+1; done
> if [ `ls /t/*.JPG 2>/dev/nul
brian moore <[EMAIL PROTECTED]> writes:
> > for name in *.mp3; do
> > newname=$(echo "$name" | sed -e 's/[ "\(\),]//g')
> > echo "Moving \"$name\" to \"$newname\""
> > mv -i "$name" "$newname"
> > done
>
> Oh, goodness, that looks complex.
>
> % rename 's/[ ,"()]/_/g' *.mp3
Why do it the
On Sat, Jan 27, 2001 at 12:12:53PM +0100, Moritz Schulte wrote:
> "oj ." <[EMAIL PROTECTED]> writes:
>
> > I have a bunch of files (*.mp3) that have spaces and characteres
> > such as: ", ( ,_. I would like to remove all the spaces and
> > characteres and leave them as: xshkjds_jskdjks_jsdj.mp3.
>
"oj ." <[EMAIL PROTECTED]> writes:
> I have a bunch of files (*.mp3) that have spaces and characteres
> such as: ", ( ,_. I would like to remove all the spaces and
> characteres and leave them as: xshkjds_jskdjks_jsdj.mp3.
for name in *.mp3; do
newname=$(echo "$name" | sed -e 's/[ "\(\),]//g')
11 matches
Mail list logo