[ale] bash commands

Richard Bronosky Richard at Bronosky.com
Sat May 26 20:13:34 EDT 2012


Ben,
I am actually guilty of writing a script with a useless use of echo as
we speak. While I originally wrote:
grep -qE '^\s*http' <<< "$line" && url="$line"
because vim's ssh syntax highlighting thinks that is a Here Doc
instead of a Here String, I had to choose between having the rest of
my file look like one big string, or cave in and use:
echo "$line" | grep -qE '^\s*http' && url="$line"

I had to go for beauty.

On Thu, May 24, 2012 at 1:50 PM, Ben Coleman <oloryn at benshome.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 5/21/2012 9:58 AM, Matthew wrote:
>> Never use pipe | for that, usually in this context, "cat doc |grep
>> hello"
>
> http://partmaps.org/era/unix/award.html
>
> Ben
> - --
> Ben Coleman oloryn at benshome.net | For the wise man, doing right trumps
> http://oloryn.benshome.net/     | looking right.  For the fool, looking
> Amateur Radio NJ8J              | right trumps doing right.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (MingW32)
> Comment: Gnu Privacy Tools
> Comment: Download at http://www.gnupt.de
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk++dPEACgkQVFJ6Ro3/tZNvewCfWxP86UH5WJUZO6GFWjEhxP98
> sPYAmwXTjXfjpbPmy7IDtaO23JtTX/5y
> =0gNf
> -----END PGP SIGNATURE-----
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo



-- 
.!# RichardBronosky #!.



More information about the Ale mailing list