[ale] bash script

Wandered Inn esoteric at denali.atlnet.com
Tue Jul 11 07:25:54 EDT 2000


"David S. Jackson" wrote:
> 
> 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

What about:

if [ ! -L $blackboxdir/[sS]tyles ]; then

	# create sym
else
	echo symlink exists..
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.

--
Until later: Geoffrey		esoteric at denali.atlnet.com

Microsoft != Innovation
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list