On 21:18:47 Nov 15, Garrett Cooper wrote:
> A better way would be to quote the string variables, i.e.:
> DIR=`/usr/bin/dirname "$path"`
> FILE=`/usr/bin/basename "$path"`
> /bin/mkdir -p "$DIR"
> touch "$FILE"
> Otherwise dirname and basename will choke on non-escaped characters 
> (i.e. spaces), mkdir/touch will make funky directories / files, 
> respectively.
> Just watch out for '$' chars in $path...
> Welcome to the wonderful world of [in]secure shell scripting :).

Thanks buddy. :)

I missed out something obvious.

Ever willing to learn.

freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to