Re: /bin/ gets deleted on error
- Date: Fri, 14 Apr 2017 10:33:34 -0400
- From: Norton Allen <allen@xxxxxxxxxxxxxxxxx>
- Subject: Re: /bin/ gets deleted on error
On 4/14/2017 8:42 AM, cyg Simple wrote:
On 4/13/2017 2:43 PM, Brian Inglis wrote:
defensive coding is your friend to avoid disasters:
if [ -n "$foodir" ] && [ -d $foodir/ ]; then
/bin/rm -fR -- $foodir || exit
echo "Can't find directory '$foodir'"
And even this can be troublesome if you mistype a variable name anywhere
in this code.
Or there are spaces in $foodir
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple