Bug 165106 - BASH scripts cannot pass arguments by variable
BASH scripts cannot pass arguments by variable
Product: Fedora
Classification: Fedora
Component: bash (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2005-08-04 09:28 EDT by Shaun Andrew
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-05 17:33:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Shaun Andrew 2005-08-04 09:28:10 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1

Description of problem:
Running bash scripts, which invoke commands with arguments passed from variables or from files, yields command usage error.  (It is as if the variables or files are being used as literals.)  The same scripts work flawlessly on ALL Fedora and Redhat releases prior to Fedora Core 4.

   mount -t ext2 $1$num ./p$num  :where $1=/dev/hdc and $num=1

   tar -xzpsf /images/2b37c_fc3raw.tar.gz ./diskinfo -T mntlis.out  :where file "mntlis.out" contains additional directories to extract from archive. 

Version-Release number of selected component (if applicable):
do not know. problem is in FC4 and I have returned to FC3

How reproducible:

Steps to Reproduce:
1. run script, which contains commands with arguments passed by variable or file.

Actual Results:  For the script containing the following command:
   mount -t ext2 $1$num ./p$num  :where $1=/dev/hdc and $num=1
bash returns "device error" or "non-existent device"

(Entering the command explicitly at the bash prompt works.) 

Expected Results:  The variables' values should have been passed as the command arguments

Additional info:

I could not find a similar bugzilla entry against bash for FC4.  I think this is a  serious problem and must affect every user.  I have returned to FC3 due to the severity of this problem.  It has rendered bash USELESS under FC4!
Comment 1 Tim Waugh 2005-08-04 09:34:34 EDT
Need a complete test case, as well as the output of 'rpm -q bash'.
Comment 2 John Thacker 2006-05-05 17:33:26 EDT
Closing due to lack of response by reporter.

Note You need to log in before you can comment on or make changes to this bug.