[elinks-users] elinks support in the VIM Netrw plug-in

Faux_Pseudo faux.pseudo at gmail.com
Tue Jul 29 15:34:26 PDT 2008


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 ${@}, ${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#



More information about the elinks-users mailing list