Re: about quote in command

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

 



On 2007-12-06 20:11, Sjoerd Mullender wrote:
> 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)

I forgot to remove the backslashes here, it should be:
$(tail -n 1 `date "+%Y-%m-%d-%H"`.txt)

> `tail -n 1 $(date "+%Y-%m-%d-%H").txt`
> 


-- 
Sjoerd Mullender


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

  Powered by Linux