On Tue, Jul 29, 2008 at 10:20:28PM +0100, Thomas Adam wrote:
> #!/bin/sh
> tempfile=`echo $* | awk '{print $1}'`
> url=`echo $* | awk '{print $2}'`
> elinks -dump $url > $tempfile
>
>
> 1. You mean "$@" over $*.
> 2. $() is more readable over backticks -- those shells which can't
> understand that aren't worth worrying about. Full stop.
> 3. Use more quotes. You should quote:
>
> "$@"
> "$url"
> "$tempfile"
>
> I note presumable since you're a Sun employee that you're using a
> shell from the arc. Oh dear. See point 2 above if so.
>
> Useful tip otherwise.
In most cases [EMAIL PROTECTED], ${url} and ${tmpfile} are even better than
quotes
because of the aforementioned readability. But it might break older
shells in which case see point #2 above.
--
=()==()==()==()==()- http://fauxascii.com
\ \ \ \ \ \ ASCII artist
:F_P:-O- -O- -O- -O- -O- -O- -O- Get your ASCII Art T-Shirt:
http://www.keystroketshirts.com/ascii/dream-in-ascii-fullView.php#
_______________________________________________
elinks-users mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-users