david at cantrell.org.uk
Fri Mar 8 06:58:38 PST 2019
On Fri, Mar 08, 2019 at 01:51:27PM +0000, get_iplayer at i.lucanops.net wrote:
> gip --etc >> $(date +%F)_log_file
> The $(command --options) bit is a sub-shell. The output, today, of date
> +%F is "2019-03-08", and that string would replace $(date +%F) in the
> log filename.
> Sub-shells can also be done with the back-quote character, `date +%F`
> is basically the same. I think the $(command) syntax is just more
> compatible across shells, so is best to use.
`backticks` are more compatible, but $( ... ) is easier to use as you
can more easily nest them within each other.
David Cantrell | Reality Engineer, Ministry of Information
The word "urgent" is the moral of the story "The boy who cried wolf". As
a general rule I don't believe it until a manager comes to me almost in
tears. I like to catch them in a cup and drink them later.
-- Matt Holiab, in the Monastery
More information about the get_iplayer