>> On Fri, 10 Apr 2009 21:44:14 +0200, >> Polytropon <free...@edvax.de> said:
P> Why don't you use echo -n which suppresses the newline instead of involving P> another program to do something that echo can do on its own? This is how P> FreeBSD does it in its system scripts. Some of my scripts date back to 1994, and they've been run under FreeBSD, Linux, and Solaris using /bin/sh, ATT Korn shell, Solaris's version of the Korn shell (which is sure as hell *NOT* the same thing), pdksh, and bash. Unfortunately, "echo -n" hasn't behaved consistently, so I used the (pretty gross) hack # echo without newline necho () { echo "$*" | tr -d '\012' } P> And according to P> test -d /usr/bin || exit 0 # /usr not mounted P> Woudln't it be more compliant to exit 1 to signal an error due to /usr not P> being mounted? Probably. The only times I've ever tried to do anything without /usr mounted is when running single-user, so a message saying /usr/bin is missing wouldn't be a bad idea. -- Karl Vogel I don't speak for the USAF or my company The danger is not that one class is unfit to govern. All classes are unfit to govern. --Lord Acton _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"