[CALUG] offsite for file access
Jim Cottrell
jecottrell3 at comcast.net
Mon Aug 12 14:19:38 EDT 2019
The Domain here is Shell Scripts. Clearly, they are Useful in other
Contexts.
Perhaps I should have said "STOP using Backticks for *shell command
replacement*"
JIM
On 8/12/19 2:05 PM, Tim Spangler wrote:
>
> Off the top of my head, Perl execution of shell script where you want
> to capture STDOUT and using a file descriptor would be inappropriate
> (thinking of past problems with Cygwin).
>
> *From:*CALUG [mailto:calug-bounces at unknownlamer.org] *On Behalf Of
> *Jason C. Miller
> *Sent:* Monday, August 12, 2019 12:38 PM
> *To:* Bryan J Smith <b.j.smith at ieee.org>
> *Cc:* CALUG mailing-list <calug at unknownlamer.org>
> *Subject:* Re: [CALUG] offsite for file access
>
> Short of legacy Bourne-shell execution, what are the cases?
>
> On Mon, Aug 12, 2019 at 9:35 AM Bryan J Smith <b.j.smith at ieee.org
> <mailto:b.j.smith at ieee.org>> wrote:
>
> Backticks are required in some cases though, so they do have their
> purpose.
>
> - bjs
>
> On Mon, Aug 12, 2019 at 12:07 PM Jim Cottrell
> <jecottrell3 at comcast.net <mailto:jecottrell3 at comcast.net>> wrote:
>
> STOP using Backticks!
>
> GOOD: var=$(command args...)
>
> BAD: var=`command args...`
>
> At the Very Least, you won't have to explain what kind of
> Quotes you are
> using.
>
> JIM
>
> On 8/8/19 1:08 PM, Howard Bampton wrote:
> > 1) Save message to a scratch file
> > 2) egrep '(http:|https:)' /path/to/scratchfile >
> /path/to/newfile
> > 3) wget `cat /path/to/newfile`
> >
> > The single quote marks in step 3 are back tics (`), not
> normal single
> > quotes (') [aka not the quote on the same key as the double
> quote key]
>
> _______________________________________________
> CALUG mailing list
> CALUG at unknownlamer.org <mailto:CALUG at unknownlamer.org>
> http://lists.unknownlamer.org/listinfo/calug
>
> _______________________________________________
> CALUG mailing list
> CALUG at unknownlamer.org <mailto:CALUG at unknownlamer.org>
> http://lists.unknownlamer.org/listinfo/calug
>
>
> _______________________________________________
> CALUG mailing list
> CALUG at unknownlamer.org
> http://lists.unknownlamer.org/listinfo/calug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unknownlamer.org/pipermail/calug/attachments/20190812/34f3dcbe/attachment-0001.html>
More information about the CALUG
mailing list