Package: util-linux
Version: 2.13-8
Severity: normal
Hi,
I seem to have found a bug of getopt from the util-linux
package. Please correct me if I'm wrong.
I believe that the suggested way to call getopt is
eval set -- `getopt -o <options> -- "$@"`
But I found that it can't handle parameters with spaces well:
$ set -- -t 'test p 1' 2
$ getopt -o t: -- "$@"
-t 'test p 1' -- '2'
Ok, so far so good, but:
$ eval set -- `getopt -o t: -- "$@"`
$ echo "'$2'"
'test p 1'
I.e., the parameter passed is "test p 1", but after the parameter
parsing, it becomes "test p 1" -- one space missing before '1'.
Comment?
(Please reply publicly to [EMAIL PROTECTED])
Thanks
Tong
$ bash --version
GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu)
$ apt-cache policy bash
bash:
Installed: 3.1dfsg-8
Candidate: 3.1dfsg-8
Version table:
*** 3.1dfsg-8 0
600 http://gulus.usherbrooke.ca lenny/main Packages
50 http://gulus.usherbrooke.ca unstable/main Packages
100 /var/lib/dpkg/status
$ apt-cache policy util-linux
util-linux:
Installed: 2.13-8
Candidate: 2.13-8
Version table:
2.13-13 0
50 http://gulus.usherbrooke.ca unstable/main Packages
*** 2.13-8 0
600 http://gulus.usherbrooke.ca lenny/main Packages
100 /var/lib/dpkg/status
2.12r-19+lenny1 0
600 http://security.debian.org lenny/updates/main Packages
-- System Information:
Debian Release: 4.0
APT prefers testing
APT policy: (600, 'testing'), (50, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-grml
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages util-linux depends on:
ii libc6 2.6.1-1+b1 GNU C Library: Shared libraries
ii libncurs 5.6+20070716-1 Shared libraries for terminal hand
ii libselin 2.0.15-2+b1 SELinux shared libraries
ii libslang 2.0.7-3 The S-Lang programming library - r
ii libuuid1 1.39+1.40-WIP-2006.11.14+dfsg-2 universally unique id library
ii lsb-base 3.1-24 Linux Standard Base 3.1 init scrip
ii tzdata 2007f-10 time zone and daylight-saving time
ii zlib1g 1:1.2.3.3.dfsg-5 compression library - runtime
util-linux recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]