home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!corp.SUn.COM!dtm
- From: dtm@corp.SUn.COM (Duane T. Mun)
- Newsgroups: gnu.bash.bug
- Subject: Why can't bash do this...
- Date: 25 Jan 1993 20:14:14 -0500
- Organization: Sun Microsystems, Inc.
- Lines: 23
- Sender: daemon@cis.ohio-state.edu
- Approved: bug-bash@prep.ai.mit.edu
- Distribution: gnu
- Message-ID: <DTM.93Jan23121322@booyaa.corp.sun.com>
-
- I'm having a problem...why does bash choke on this:
-
- cmdname=`_=\`/bin/basename $0\`; /bin/expr $_ : '\(.*\),v' \| $_`
-
- Here's some debug info from bash:
-
- +++ /bin/basename ./tst
- ++ _=tst
- ++ /bin/expr : \(.*\),v |
- expr: syntax error
-
- $_ isn't being assign anything from /bin/basename.
-
- This works fine with /bin/sh:
-
- + cmdname=
- + /bin/basename ./tst
- _=tst
- + /bin/expr tst : \(.*\),v | tst
- cmdname=tst
-
- Thanks.
-
-