groff
[Top][All Lists]
Advanced

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

Re: [Groff] [PATCH] mdate.sh: rewrite in Perl


From: walter harms
Subject: Re: [Groff] [PATCH] mdate.sh: rewrite in Perl
Date: Sat, 18 Feb 2017 19:52:57 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11


Am 18.02.2017 19:07, schrieb James K. Lowden:
> On Sat, 18 Feb 2017 03:28:03 +0000
> Colin Watson <address@hidden> wrote:
> 
>> This version is much shorter and easier to understand than the
>> shell/awk version: we don't have to worry about convincing ls to
>> produce output that we can parse, and we don't have to play games
>> with the way that the same field may contain either the year or the
>> time depending on how old the file is.
> 
> Attached please find fdate.c. It accepts filename argments and prints
> the files' mtimes (and, optionally, names).  Like date(1), it accepts a
> strftime format argument, defaulting to yyyy-mm-dd.
> 
> If you would like to use it instead, i can provide the necessary GNU
> paperwork.  
> 
> $ fdate ~/projects/3/groff/*
> 2016-04-21
> 2013-11-12
> 2016-04-19
> 
> $ fdate -v +'%d %B %Y' ~/projects/3/groff/*
> 21 April 2016 /home/jklowden/projects/3/groff/groff
> 12 November 2013 /home/jklowden/projects/3/groff/mkgrft
> 19 April 2016 /home/jklowden/projects/3/groff/sidebar
> 
> --jkl


I dont know why this is needed in the first place, but maybe stat(1)
can help here ?

re,
 wh



reply via email to

[Prev in Thread] Current Thread [Next in Thread]