Date: Sat, 18 Aug 2012 21:23:03 GMT From: Devin Teske <dteske@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/170759: bsdinstall(8) produces "unexpected operator" error when passed multi-word first-argument containing whitespace Message-ID: <201208182123.q7ILN3d2070372@red.freebsd.org> Resent-Message-ID: <201208182130.q7ILU933005706@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 170759 >Category: bin >Synopsis: bsdinstall(8) produces "unexpected operator" error when passed multi-word first-argument containing whitespace >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Aug 18 21:30:09 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Devin Teske >Release: FreeBSD 9.0-RELEASE i386 >Organization: FIS Global, Inc. >Environment: FreeBSD scribe9.vicor.com 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:15:25 UTC 2012 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: When executing bsdinstall(8) with a multi-word first-argument, you get an "unexpected operator" error. >How-To-Repeat: Execute: bsdinstall foo Result: No error, as expected Execute now: bsdinstall foo\ bar Result: [: foo: unexpected operator >Fix: The problem is surely line 37 of bsdinstall(8) shown below: if [ -z $VERB ]; then Which should be instead: if [ -z "$VERB" ]; then >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208182123.q7ILN3d2070372>