why is this script failing?

2008-07-14 Thread Gary Kline
people, for reasons i don't understand completely, i wind up with *wav* files in my /tmp/kde-kline/* directory. plus othr misc junk files. why is this script not finding them? wav=/tmp/kde-kline/\*wav\* if [ -s $wav ] then echo "Wav files found"

Re: why is this script failing?

2008-07-14 Thread Reid Linnemann
Written by Gary Kline on 07/14/08 15:12>> > people, > > for reasons i don't understand completely, i wind up with > *wav* files in my /tmp/kde-kline/* directory. plus othr misc junk > files. > > why is this script not finding them? > > > wav=/tmp/kde-kline/\*wav\*

Re: why is this script failing?

2008-07-14 Thread Mel
On Monday 14 July 2008 22:12:47 Gary Kline wrote: > people, > > for reasons i don't understand completely, i wind up with > *wav* files in my /tmp/kde-kline/* directory. plus othr misc junk > files. > > why is this script not finding them? > > > wav=/tmp/kde-kline/\*wa

Re: why is this script failing?

2008-07-14 Thread David Kelly
On Mon, Jul 14, 2008 at 01:12:47PM -0700, Gary Kline wrote: > > why is this script not finding them? > > > wav=/tmp/kde-kline/\*wav\* > > if [ -s $wav ] As others have pointed out because if "/tmp/kde-kline/file1.wav /tmp/kde-kline/file2.wav" is found the -s will fail because $wav isn't

Re: why is this script failing?

2008-07-14 Thread Gary Kline
On Mon, Jul 14, 2008 at 04:09:24PM -0500, David Kelly wrote: > On Mon, Jul 14, 2008 at 01:12:47PM -0700, Gary Kline wrote: > > > > why is this script not finding them? > > > > > > wav=/tmp/kde-kline/\*wav\* > > > > if [ -s $wav ] > > As others have pointed out because if "/tmp/kde-kline/fi

Re: why is this script failing?

2008-07-14 Thread David Kelly
On Mon, Jul 14, 2008 at 02:56:27PM -0700, Gary Kline wrote: > > But as you point out, the followingisthat much more effective. > or at least lesss typing. > > > > > But why do it the hard way? > > > > #!/bin/sh > > /bin/rm /tmp/kde-kline/*wav > /dev/null 2>&1 > > with this, >

Re: why is this script failing?

2008-07-14 Thread RW
On Mon, 14 Jul 2008 14:56:27 -0700 Gary Kline <[EMAIL PROTECTED]> wrote: > You're right of course, and for the most bothersome hundreds > of wav and log files this works: You might also consider adding clear_tmp_enable=yes to rc.conf, and daily_clean_tmps_enable=yes to periodic.conf, to del

Re: why is this script failing?

2008-07-14 Thread Wojciech Puchar
why is this script not finding them? wav=/tmp/kde-kline/\*wav\* why you put \ before * if [ -s $wav ] then echo "Wav files found"; ls -l $wav; /bin/rm ${wav}; else echo "No wav files in /tmp/kde-kline"; exit 0; fi do i have to cd to /tm

Re: why is this script failing?

2008-07-15 Thread Gary Kline
On Tue, Jul 15, 2008 at 07:37:02AM +0200, Wojciech Puchar wrote: > > > > why is this script not finding them? > > > > > >wav=/tmp/kde-kline/\*wav\* > > why you put \ before * > to allow the shell to catch various formsof strings with "wav" embedded. -- Gary Kline [EMAI

Re: why is this script failing?

2008-07-15 Thread David Kelly
On Tue, Jul 15, 2008 at 11:35:00AM -0700, Gary Kline wrote: > On Tue, Jul 15, 2008 at 07:37:02AM +0200, Wojciech Puchar wrote: > > > > > > why is this script not finding them? > > > > > > > > >wav=/tmp/kde-kline/\*wav\* > > > > why you put \ before * > > to allow the shell to catch variou

Re: why is this script failing?

2008-07-15 Thread Gary Kline
On Tue, Jul 15, 2008 at 02:02:24PM -0500, David Kelly wrote: > On Tue, Jul 15, 2008 at 11:35:00AM -0700, Gary Kline wrote: > > On Tue, Jul 15, 2008 at 07:37:02AM +0200, Wojciech Puchar wrote: > > > > > > > > why is this script not finding them? > > > > > > > > > > > >wav=/tmp/kde-kline/\*wav\* > >

Re: why is this script failing?

2008-07-15 Thread Norberto Meijome
On Tue, 15 Jul 2008 14:50:24 -0700 Gary Kline <[EMAIL PROTECTED]> wrote: > thanks for this clarification! until yesterday, whe you > mmentioned blanks[whitespace], as id a song title, i hadn't > tought about songs like "Not Ready to Make Nice.ogg" e.g. > I am not sure wh

Re: why is this script failing?

2008-07-15 Thread David Kelly
On Jul 15, 2008, at 4:50 PM, Gary Kline wrote: On Tue, Jul 15, 2008 at 02:02:24PM -0500, David Kelly wrote: Is probably best to postpone wildcard expansion until the last moment because if any of the filenames contain spaces the space will probably cause a break between arguments. The first

Re: why is this script failing?

2008-07-15 Thread Wayne Sierke
On Wed, 2008-07-16 at 11:42 +1000, Norberto Meijome wrote: > you can always do > > find /tmp/kde-*/ -iname "*wav" -print0 | xargs -0 rm -vf > > the advantage over doing using rm * or for * in ... is that if you > have LOTS of files, the expanded list of files may be too much. find | > xargs will

Re: why is this script failing?

2008-07-16 Thread Beech Rintoul
On Tuesday 15 July 2008, Wayne Sierke said: > On Wed, 2008-07-16 at 11:42 +1000, Norberto Meijome wrote: > > you can always do > > > > find /tmp/kde-*/ -iname "*wav" -print0 | xargs -0 rm -vf > > > > the advantage over doing using rm * or for * in ... is that if > > you have LOTS of files, the expa

Re: why is this script failing?

2008-07-16 Thread RW
On Wed, 16 Jul 2008 15:52:59 +0930 Wayne Sierke <[EMAIL PROTECTED]> wrote: > On Wed, 2008-07-16 at 11:42 +1000, Norberto Meijome wrote: > > you can always do > > > > find /tmp/kde-*/ -iname "*wav" -print0 | xargs -0 rm -vf > > > > the advantage over doing using rm * or for * in ... is that if y

Re: why is this script failing?

2008-07-16 Thread Wayne Sierke
On Wed, 2008-07-16 at 15:01 +0100, RW wrote: > On Wed, 16 Jul 2008 15:52:59 +0930 > Wayne Sierke <[EMAIL PROTECTED]> wrote: > > > On Wed, 2008-07-16 at 11:42 +1000, Norberto Meijome wrote: > > > you can always do > > > > > > find /tmp/kde-*/ -iname "*wav" -print0 | xargs -0 rm -vf > > > > > > t

Re: why is this script failing?

2008-07-16 Thread RW
On Thu, 17 Jul 2008 00:08:56 +0930 Wayne Sierke <[EMAIL PROTECTED]> wrote: > Except that the -delete primary of find is not the equivalent of rm > -vf, or even of just rm -f. Obviously, but the -vf options weren't in the original script, they were added as an illustration by an intermediate post.

Re: why is this script failing?

2008-07-16 Thread Gary Kline
On Tue, Jul 15, 2008 at 08:42:13PM -0500, David Kelly wrote: > > On Jul 15, 2008, at 4:50 PM, Gary Kline wrote: > > >On Tue, Jul 15, 2008 at 02:02:24PM -0500, David Kelly wrote: > >> [[ ... ]] > > I am not sure why these players store the song in wav format > > without deleting

Re: why is this script failing?

2008-07-16 Thread Giorgos Keramidas
On Tue, 15 Jul 2008 14:50:24 -0700, Gary Kline <[EMAIL PROTECTED]> wrote: > thanks for this clarification! until yesterday, whe you mmentioned > blanks[whitespace], as id a song title, i hadn't tought about songs > like "Not Ready to Make Nice.ogg" e.g. I am not sure why these > players store the

Re: why is this script failing?

2008-07-16 Thread Gary Kline
On Thu, Jul 17, 2008 at 11:19:49AM +0300, Giorgos Keramidas wrote: > On Tue, 15 Jul 2008 14:50:24 -0700, Gary Kline <[EMAIL PROTECTED]> wrote: > > thanks for this clarification! until yesterday, whe you mmentioned > > blanks[whitespace], as id a song title, i hadn't tought about songs > > like "No

Re: why is this script failing?

2008-07-17 Thread RW
On Wed, 16 Jul 2008 16:03:32 -0700 Gary Kline <[EMAIL PROTECTED]> wrote: > On Tue, Jul 15, 2008 at 08:42:13PM -0500, David Kelly wrote: > > You might consider adding something like > > > > setenv TMPDIR /home/dkelly/tmp > > setenv TMP /home/dkelly/tmp There are also KDEVARTMP and KDETMP

Re: why is this script failing?

2008-07-17 Thread Gary Kline
On Thu, Jul 17, 2008 at 06:35:21PM +0100, RW wrote: > On Wed, 16 Jul 2008 16:03:32 -0700 > Gary Kline <[EMAIL PROTECTED]> wrote: > > > On Tue, Jul 15, 2008 at 08:42:13PM -0500, David Kelly wrote: > > > > You might consider adding something like > > > > > > setenv TMPDIR /home/dkelly/tmp > > >