about quote in command

Gijs info at boer-software-en-webservices.nl
Thu Dec 6 18:27:28 UTC 2007


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 
>
>   
Well, as far as I know this works:
tail -n 1 $(date "+%Y-%m-%d-%H").txt
tail -n 1 `date "+%Y-%m-%d-%H"`.txt
or somewhat harder:
temp=`date "+%Y-%m-%d-%H"`.txt && tail -n 1 $temp

Hope this works for you.

Regards




More information about the fedora-list mailing list