of you want to run the command in the quotes and to assign its output to the file variable - then you do it wrong.
put the reverse quotes.
 
`   `
 
not
 
'     '
 
----- Original Message -----
From: cana rich
Sent: Tuesday, August 13, 2002 6:10 PM
Subject: HowTo : skip a null ls and not be blocked

Hello,

     I've writen a script like this :

#!/usr/bsh

file='ls -1 /home/directory/*'

echo $file

....

Meanwhile, when there is nothing in this directory, the script is blocked. I've tried to put :

file='ls -1 /home/directory/*' >> /dev/null

but it doesn't work.

Can you help me please?

Thanks

Canarich



Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !

Reply via email to