Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#22405 - [dash] IFS set to tab does not work

Attached to Project: Arch Linux
Opened by taree (taree) - Tuesday, 11 January 2011, 21:01 GMT
Last edited by Dan McGee (toofishes) - Monday, 25 July 2011, 17:43 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dan McGee (toofishes)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

dash cannot set IFS to tab (and tab only) before read

Additional info:
* package version(s)
dash 0.5.6.1-1

* config and/or log files etc.
--

Steps to reproduce:

1. create file (testfile) with:

test1<space>test2<tab>test3

(where <space> represent ' ' and tab ' ' etc

2. run:

#!/bin/dash

cat testfile |
while IFS=' ' read col1 col2; do
echo $col1
echo $col2
done

exit 0

(posting it here will probably replace the tab with spaces)

2. it will give the output:
test1
test2 test3

instead of:
test1 test2
test3

ie. it uses the space for IFS

the same script works in earlier versions of dash.
This task depends upon

Closed by  Dan McGee (toofishes)
Monday, 25 July 2011, 17:43 GMT
Reason for closing:  Fixed
Additional comments about closing:  0.5.7-1
Comment by taree (taree) - Tuesday, 11 January 2011, 21:25 GMT
pasting seems to have edited out the tab, and space apparantly
Comment by Dan McGee (toofishes) - Tuesday, 11 January 2011, 21:26 GMT
Attach file instead if you need to preserve tabs/spaces, but more importantly, have you brought this up upstream? This is more than likely not a packaging issue so I can't do any more than you can about this.
Comment by taree (taree) - Tuesday, 11 January 2011, 21:48 GMT
ok, will do.
i haven't. i'll see if i can bring this upstream.
thanks.
Comment by taree (taree) - Tuesday, 11 January 2011, 23:23 GMT
i have talked with someone on the dash ml, and everything works fine for him

"It works correctly for me, with dash 0.5.5.1-7.4 and with current
dash master (49a94e2) from git://git.kernel.org/pub/scm/utils/dash/dash.git

I don't know 0.5.6.1-1. There was a version 0.5.6.1-1~exp0 in
Debian experimental for a little while but that was seriously
broken so I assume that's not the version you're using.
git log v0.5.6.1..49a94e2 doesn't include anything obviously relevant."

i'm including the actual example files that are not working on my system with dash 0.5.6.1-1
maybe it's something wrong locally for me in the end.
(application/x-gzip)    bla.tgz (0.2 KiB)
Comment by Dan McGee (toofishes) - Tuesday, 11 January 2011, 23:29 GMT Comment by taree (taree) - Wednesday, 12 January 2011, 16:19 GMT
running the script included above in the git version of dash produced the correct output,
running the same script in dash 0.5.6.1-1 produce the wrong output.

Loading...