JR Rothschild wrote:
> Hi,
> In either version 3.1.17 (SUSE 10) or 3.2.25 (RHEL 5.3), with $DISPLAY
> set to :0.0
> the following script gives unexpected results.(It works with version
> 3.0.15 - RHEL4.6) The echo should print out
>
> smith:0.0
It shouldn't display that; there are different bugs in 3.0 and 3.1/3.2.
> instead of
>
> smith 0.0
That's not right, either.
> #!!/bin/bash
> dh=smith
> oldIFS=$IFS
> IFS=:
> set $DISPLAY
> nd="${dh}:$@"
> IFS=$oldIFS
>
> echo $nd
The correct output is "smith: 0.0". The `smith' from $dh, the literal
colon, the space from the spaces separating the "$@" (splitting on `:'
results in $1 being a null field), then the 0.0 ($2).
If you use nd="${dh}$*" before resetting IFS, you'll get the output you
in bash-3.0 through bash-4.0.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/