Bug 165106 - BASH scripts cannot pass arguments by variable
Summary: BASH scripts cannot pass arguments by variable
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-08-04 13:28 UTC by Shaun Andrew
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-05-05 21:33:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Shaun Andrew 2005-08-04 13:28:10 UTC
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.

Examples:
   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:
Always

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

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 13:34:34 UTC
Need a complete test case, as well as the output of 'rpm -q bash'.

Comment 2 John Thacker 2006-05-05 21:33:26 UTC
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.