<br clear="all">qingchengl@T61:/tmp$ cat /etc/issue<br>Ubuntu 9.04 \n \l<br><br>qingchengl@T61:/tmp$ uname -a<br>Linux T61 2.6.28-15-generic #48-Ubuntu SMP Wed Jul 29 08:54:56 UTC 2009 i686 GNU/Linux<br>qingchengl@T61:/tmp$ bash --version<br>
GNU bash, version 3.2.48(1)-release (i486-pc-linux-gnu)<br><div>Copyright (C) 2007 Free Software Foundation, Inc.</div><div><br></div><div><br></div><div>qingchengl@T61:/tmp$ cat run.sh</div><div>#!/bin/bash<br><br>echo "Input filename: $1"<br>
<br>BOUNDARY='-----------------------------=.3943144700514'<br><br>if [ ! -f $1 ]; then<br>        echo "File $1 doesn't exist"<br>fi<br><br>echo "${BOUNDARY}"<br><br>while read line <br>do<br> echo "${line}"</div>
<div># this string comparison never return true, I have tried double bracket and double =</div><div># This script run normally on Debian 4.01<br> if [ "${line}" = "${BOUNDARY}" ]; then <br>                echo "found start boundary"<br>
        fi<br><br>done < $1<br><br></div><div><br></div><div> qingchengl@T61:/tmp$ cat ipfile <br>-----------------------------=.3943144700511<br>-----------------------------=.3943144700512<br>-----------------------------=.3943144700513<br>
-----------------------------=.3943144700514<br><br></div><div>qingchengl@T61:/tmp$ ./extract.sh ./ipfile <br>Input filename: ./ipfile<br>-----------------------------=.3943144700514<br>-----------------------------=.3943144700511<br>
-----------------------------=.3943144700512<br>-----------------------------=.3943144700513<br>-----------------------------=.3943144700514<br><br><br></div><div><br></div><div><br></div><div>-- <br></div><a href="mailto:trulyliu@gmail.com">trulyliu@gmail.com</a><br>
<br>