Re: about quote in command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux