Article View: gnu.bash.bug
Article #546$@ in bash
From: Soren Lundsgaard
Date: Wed, 06 Sep 1989 20:37
Date: Wed, 06 Sep 1989 20:37
24 lines
886 bytes
886 bytes
$@ does not work well.
I have a file named "a b" that I want to view. I have the following function:
view() {
less ${1+"$@"}
}
if I run:
view "a b"
I get:
a: No such file or directory
b: No such file or directory
BASH_VERSION=1.030 (pre-release sent to Dan Grayson at uiucmath).
I have enjoyed shell programming ever since I learned of the ${1+"$@"}
construct on the network a few years ago. I enjoy bash, and continue
to hope for its good luck and popularity.
skl.
Technical Details
Message-ID:
<8909062037.AA14123@abel.math.uiuc.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ABEL.MATH.UIUC.EDU!sklShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ABEL.MATH.UIUC.EDU!skl From: skl@ABEL.MATH.UIUC.EDU (Soren Lundsgaard) Newsgroups: gnu.bash.bug Subject: $@ in bash Message-ID: <8909062037.AA14123@abel.math.uiuc.edu> Date: 6 Sep 89 20:37:12 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 24