[MPlayer-users] scripting problem

Marcel Naziri zwobbl at zwobbl.de
Sun Jan 5 13:54:53 CET 2003


hello,

> > for mov in `ls -1t`; do mplayer $mov; done
> >
> > to play the movies in directory sorted by date...
> > mplayer complains e.g.
> >
> > Playing 08.mpg
> > File not found: '08.mpg'
> >
> > but the file exists and something like
> > for mov in 05.mpg 08.mpg; do mplayer $mov; done
> > works.
>
> That sounds rather strange.
> Does the filename have some spaces ?

no, no file has any spaces... that would be the next step... :)

> try:
> for mov in `ls -1t`; do mplayer "$mov"; done

nothing helps...

> yet, the smarter way would be to use the playlist option:
>
> ls -1t | mplayer -playlist -

this ends up in a "Speicherzugriffsfehler", segmentation fault i think in 
english... :)

strange thing is that the problem only occure with the bash, running GNU bash, 
version 2.05b.0(1)-release (i386-pc-linux-gnu)... 
with csh or sh all the mentioned methods are working well.
which shell you are using?

> PS: Shell scripting is cool :)

yeah, you got it... :)

cheerio
   zwobbl



More information about the MPlayer-users mailing list