D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Just a silly command line question

 

On 24/05/07 11:27:35, Martijn wrote:
> Hello.
> 
> If I run the command
>   date +'%Y%m%d.log'
> it returns
> 20070524.log
> (well, it does today). Now I would like to extend the command to use
> the output as a file name and do something to that file (e.g. cat,
> less, etc.). Is that possible to do in one line?
>

cat `date +'%Y%m%d.log'`

-- 
'ooroo

stinga...(:)-)
---------------------------------------------------
Email: stinga@xxxxxxxxxxxxx      o
You need only two tools.        o /////
A hammer and duct tape. If it    /@   `\  /) ~
doesn't move and it should,     >  (O)  X<  ~  Fish!!
use the hammer. If it moves and  `\___/'  \) ~
shouldn't, use the tape.           \\\
---------------------------------------------------

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html