<br clear="all">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>
Copyright (C) 2007 Free Software Foundation, Inc.<br><br><br>qingchengl@T61:/tmp$ cat run.sh<br>#!/bin/bash<br><br>echo &quot;Input filename: $1&quot;<br><br>BOUNDARY=&#39;-----------------------------=.3943144700514&#39;<br>
<br>if [ ! -f $1 ]; then<br>echo &quot;File $1 doesn&#39;t exist&quot;<br>fi<br><br>echo &quot;${BOUNDARY}&quot;<br><br>while read line <br>do<br> echo &quot;${line}&quot;<br># this string comparison never return true, I have tried double bracket and double =<br>
# This script  run normally on Debian 4.01<br> if [ &quot;${line}&quot; = &quot;${BOUNDARY}&quot; ]; then   <br>echo &quot;found start boundary&quot;<br>fi<br><br>done &lt; $1<br><br><br>qingchengl@T61:/tmp$  cat ipfile <br>
-----------------------------=.3943144700511<br>-----------------------------=.3943144700512<br>-----------------------------=.3943144700513<br>-----------------------------=.3943144700514<br><br>qingchengl@T61:/tmp$  ./extract.sh ./ipfile <br>
Input filename: ./ipfile<br>-----------------------------=.3943144700514<br>-----------------------------=.3943144700511<br>-----------------------------=.3943144700512<br>-----------------------------=.3943144700513<br>-----------------------------=.3943144700514<br>
<br><br><br><br>-- <br><div><a href="mailto:trulyliu@gmail.com">trulyliu@gmail.com</a></div><div><br></div><div>-- <br></div><a href="mailto:trulyliu@gmail.com">trulyliu@gmail.com</a><br><br>