about quote in command
Sjoerd Mullender
sjoerd at acm.org
Thu Dec 6 19:11:51 UTC 2007
On 2007-12-06 18:59, adrian kok wrote:
> Hi all
>
> how can I make the quote correct?
>
> `tail -n 1 `date "+%Y-%m-%d-%H"`.txt`
>
> `date "+%Y-%m-%d-%H"`.txt is file
>
> thank you
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
All of these should work:
`tail -n 1 \`date "+%Y-%m-%d-%H"\`.txt`
$(tail -n 1 $(date "+%Y-%m-%d-%H").txt)
$(tail -n 1 \`date "+%Y-%m-%d-%H"\`.txt)
`tail -n 1 $(date "+%Y-%m-%d-%H").txt`
--
Sjoerd Mullender
More information about the users
mailing list