dash does not read IFS properly
Bug #285651 reported by
Mike H
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dash (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: dash
When IFS is set in a script, and the script as started with dash, dash doesn't understand IFS properly.
IFS is set and the script name has a n or a t in it's name, dash removes those characters.
eg. script: /home/username/
=========
#/bin/dash
IFS=' \t\n'
echo $0
=========
result:
/home/user ame/bi / es ew.sh
expected result:
/home/username/
the same result happens if script is #!/bin/bash or #!/bin/sh and it is started with 'dash scriptname', since Ubuntu points /bin/sh -> /bin/dash this happens in almost every script.
To post a comment you must log in.
Hi. forum.soft32. com/linux2/ Bug-409179- DASH-Settings- IFS-work- properly- ftopict70039. html
About the IFS "issue", i found an satisfactory explanation explanation for this here;
http://
To sum it up, you should use
<CODE>
IFS='
'
</CODE>
instead, since the bash syntax isn't specified in POSIX. ubuntuforums. org/showthread. php?t=438355
As for how and under what conditions are run, look here;
http://
So, to sum it up, i *think* this bug should be marked as "INVALID".