[ale] bash script

David S. Jackson dsj at sylvester.dsj.net
Mon Jul 10 14:19:42 EDT 2000


Hi,

I want a script to check for the existence of a symlink.  The
symlink can be either $blackboxdir/styles -> $blackboxdir/Styles or
$blackboxdir/Styles -> $blackboxdir/styles.  It doesn't matter,
as long as both directories exist as either directory or symlink.

Will this work?

# if no symlink exists, create it.  Is syntax right?
if [ ! \(-L $blackboxdir/styles\) || \(-L $blackboxdir/Styles\) ]; then
  # create the symlink blah blah
else echo "Great!  You've already got the symlinks!"
fi

TIA!

--
David S. Jackson                           http://www.dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"To have some deep feeling about Buddhism is not the point; we 
just do what we should do, like eating supper and going to bed.
This is Buddhism."           --Shunryu Suzuki
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list