Fwd: Fwd: Fwd: [DISCUSS] 10 Good Unix command line habits

Don Ellis don.ellis at alumni.rice.edu
Sun Dec 17 22:20:18 CST 2006


A response from a St. Louis colleague:

---------- Forwarded message ----------
From: Robert Citek <robert.citek at gmail.com>
Date: Dec 17, 2006 7:42 PM
Subject: Re: Fwd: Fwd: [DISCUSS] 10 Good Unix command line habits
To: discuss at sluug.org



Also, in "Use escape sequences to manage long input", there's no need to
put a backslash after a pipe (|), logical or (||), or logical and (&&).
So, this:

~ $ cd tmp/a/b/c || \
> mkdir -p tmp/a/b/c && \
> tar xvf -C tmp/a/b/c ~/archive.tar

can be re-written as this:

~ $ cd tmp/a/b/c ||
> mkdir -p tmp/a/b/c &&
> tar xvf -C tmp/a/b/c ~/archive.tar

Happy Holidays to all.

Regards,
- Robert

Don Ellis wrote:
> Ed and Group,
>
> Here's a note from one of our KC colleagues (to whom I forwarded this)
> pointing out an error on the page (which I noticed but didn't share).
>
> --Don Ellis
>
>
> ---------- Forwarded message ----------
> From: *Luke-Jr* <luke at dashjr.org <mailto:luke at dashjr.org>>
> Date: Dec 17, 2006 12:54 AM
> Subject: Re: Fwd: [DISCUSS] 10 Good Unix command line habits
> To: kclug at kclug.org <mailto:kclug at kclug.org>
>
> Notes:
> In "Quote variables with caution", it says to use square brackets, and
then
> goes on to give a correct example with curly braces.
> "Stop piping cats" only refers to piping to grep, but in reality there's
> almost never a good reason to pipe a single-file cat. The < operator
> provides
> a file on standard input. So "cat foo | wc -l" can become "wc -l < foo"

-------
St. Louis Unix Users Group - http://www.sluug.org/
To unsubscribe from the SLUUG discussion mailing list, send a message to
discuss-request at sluug.org with the word 'unsubscribe' as the body
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://kclug.org/pipermail/kclug/attachments/20061217/4b056efd/attachment.htm 


More information about the Kclug mailing list