Running a script in a sub dir with space in it

Hi

I am trying to run a script in a sub-directory, that has one space on it: such as:

/internaldisk1/Task Logs1

, but my entry in cron is not working:

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /internaldisk1/Task\ logs1/./remov_reject.sh > /var/tmp/interd_`date '+%Y%M%d'`.log 2>&1

Please can you correct me if I am wrong?

have you tried

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /internaldisk1/Task*logs1

PS: I havent tested it....

Have you tried ?

/internaldisk1/Task*Logs1

or

/internaldisk1/Task" "Logs1

Not sure I like the sight of wild cards in something like that .. :slight_smile:

what if the folder:

Task_old_Logs1

gets created?

I tested on my system (Solaris) - and this works - any reason why you just don't wrap the whole thing in double quotes ?? [edit] or is that not something cron likes ?? [\edit]

 
>  /usr/ditto/work/temp/temp > ls -ltr
total 0
drwxr-x---   2 ditto    xxxx         96 Sep 16 09:57 test folder
>  /usr/ditto/work/temp/temp > ls -ltr test*
total 2
-rw-r-----   1 ditto    xxxx         16 Sep 16 09:57 test.sh
>  /usr/ditto/work/temp/temp > more test*/*
echo "It ran!"
>  /usr/ditto/work/temp/temp > ksh "./test folder/test.sh"
It ran!
>  /usr/ditto/work/temp/temp > ksh ./"test folder"/test.sh
It ran!
>  /usr/ditto/work/temp/temp >
 

So is the directory name Task Logs1 with a capital "L" or Task logs1 with a lowercase "l"?

There is a good chance that using the same case in both places will fix your problem.