coreutils
[Top][All Lists]
Advanced

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

Re: date enhancement - filter to preface each line of input with timesta


From: Eric Blake
Subject: Re: date enhancement - filter to preface each line of input with timestamp
Date: Mon, 2 Nov 2015 14:14:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/02/2015 01:56 PM, Shawn McMahon wrote:
> On Mon, Nov 2, 2015 at 3:52 PM, Evan Rempel <address@hidden> wrote:
> 
>>
>> The task is easy to solve in nearly any language, but I can not depend on
>> awk, perl, python, tcl, java or any other interpreter to be available in
>> all of the enviroments 

perl, python, tcl, java, and many other interpreters are not in POSIX,
so you are correct that you cannot rely on them being present on all
systems.  But awk IS required by POSIX, and is quite portably present in
practice (although you have to use a common subset of features, as not
all awks are the same).

>> IMHO one of the greatest strengths of the core (or more) utils is
>> that they provide this consistency and standardization when nothing else
>> does.

Even if awk is not part of GNU coreutils, it is commonly available.
Similarly, other POSIX commands such as 'find' and even 'sh' are not
part of coreutils, but you can rely on them being present.

> 
> I think you could probably count on the presence of awk more certainly than
> the presence of an up-to-date "date".

Indeed - writing a solution that is portable to the functionality
required by POSIX is going to be a lot more likely to work on a random
system than writing a solution that requires new-enough GNU coreutils to
be installed.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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