string comparison bug of bash on Ubuntu 9.04 i386
Paul Gevers
paul at climbing.nl
Sat Aug 22 06:54:31 BST 2009
Hi Trulyliu,
Thank you for reporting bugs. However, this list is not the platform to
do that. Please report bugs in the bug-tracker at
https://bugs.launchpad.net/bugs/+filebug
And please, in your bug report try to give a more extensive description
of the problem, and also what you expect or what should happen.
By the way, it looks like you have your scripts mixed up. You report the
contents of run.sh, but use the extract.sh script (where we don't know
the contents of). Please be aware that usually scripts start with
#!/bin/sh, but in Ubuntu we replaced bash with dash for the sh
functionality, which might behave different in details.
With kind regards
Paul
trulyliu wrote:
>
> Ubuntu 9.04 \n \l
>
> qingchengl at T61:/tmp$ uname -a
> Linux T61 2.6.28-15-generic #48-Ubuntu SMP Wed Jul 29 08:54:56 UTC 2009
> i686 GNU/Linux
> qingchengl at T61:/tmp$ bash --version
> GNU bash, version 3.2.48(1)-release (i486-pc-linux-gnu)
> Copyright (C) 2007 Free Software Foundation, Inc.
>
>
> qingchengl at T61:/tmp$ cat run.sh
> #!/bin/bash
>
> echo "Input filename: $1"
>
> BOUNDARY='-----------------------------=.3943144700514'
>
> if [ ! -f $1 ]; then
> echo "File $1 doesn't exist"
> fi
>
> echo "${BOUNDARY}"
>
> while read line
> do
> echo "${line}"
> # this string comparison never return true, I have tried double bracket
> and double =
> # This script run normally on Debian 4.01
> if [ "${line}" = "${BOUNDARY}" ]; then
> echo "found start boundary"
> fi
>
> done < $1
>
>
> qingchengl at T61:/tmp$ cat ipfile
> -----------------------------=.3943144700511
> -----------------------------=.3943144700512
> -----------------------------=.3943144700513
> -----------------------------=.3943144700514
>
> qingchengl at T61:/tmp$ ./extract.sh ./ipfile
> Input filename: ./ipfile
> -----------------------------=.3943144700514
> -----------------------------=.3943144700511
> -----------------------------=.3943144700512
> -----------------------------=.3943144700513
> -----------------------------=.3943144700514
>
>
>
>
> --
> trulyliu at gmail.com <mailto:trulyliu at gmail.com>
>
> --
> trulyliu at gmail.com <mailto:trulyliu at gmail.com>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/ubuntu-bugsquad/attachments/20090822/4b70dc2d/attachment.pgp
More information about the Ubuntu-bugsquad
mailing list