Add-on: [CS-FSLUG] Alarm for command-line processes?

Linc Fessenden l4c at thelinuxlink.net
Sat May 8 05:33:07 CDT 2004


On Sat, 8 May 2004 10:14:47 +0300
Jukka Y <mail at ylonen.info> wrote:

> This is the script that I use. Is there something (that I could add into it) 
> to get "alarm" after it finishes:
> 
> (script is in single line)
> for i in *jpg;do export i=`echo $i|perl -e '<> =~ /^(.+)\./; print "$1
> \n";'`;echo "converting $i"; convert $i.jpg $i.pnm; rm $i.jpg; c44 $i.pnm 
> $i.djvu; rm $i.pnm ; done
> 
> Blessings,
> Jukka
> 
> On Saturday 08 May 2004 09:16, Jukka Y wrote:
> > Hi!
> >
> > I am running a short script that converts graphics files to another format.
> > Job is quite time consuming (alltogether 4,5 Gb divided in several folders)
> > and script cannot do conversion recursively. What programs/options should I
> > use to set a visual (or sound-) alarm to inform me when command-line
> > process stops?
> >
> > Jukka

Wow Jukka, tha sure is convoluted :-)  I am not a fan of perl syntax :-)
Try adding a:

for i in *jpg;do export i=`echo $i|perl -e '<> =~ /^(.+)\./; print "$1
\n";'`;echo "converting $i"; convert $i.jpg $i.pnm; rm $i.jpg; c44 $i.pnm 
$i.djvu; rm $i.pnm ; done; mpg123 /path/to/your/favorite/file.mp3

Now you could also use the "find" command to run the script recoursively...

-- 
-Linc Fessenden

In the Beginning there was nothing, which exploded - Yeah right...





More information about the Christiansource mailing list