mpalmer at hezmatt.org
Wed Apr 5 09:43:32 UTC 2006
On Wed, Apr 05, 2006 at 10:08:12AM +0100, Daniel Carrera wrote:
> >>Another difference applies to well-intentioned but buggy scripts. When
> >>you trust the script writer's intentions, but not his coding skills :)
> >>it doesn't hurt to minimise the time spent as root.
> >There is that. Nothing like a bit of
> >rm -rf /$INSTDIR
> >without checking [ -n "$INSTDIR" ] first to really make somebody's day.
> What does [ -n do?
> I assume that it checks whether $INSTDIR is not empty.
the length of STRING is nonzero
Effectively equivalent to [ "$INSTDIR" != "" ].
More information about the ubuntu-users