tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Proposal: Add option to add dates to write(1)
On Thu, Jun 28, 2012 at 11:29:39PM +0000, Christos Zoulas wrote:
> In article <20120628205453.50bc7f59@adolfputzen>,
> Julian Djamil Fagir <tech-userlevel%netbsd.org@localhost> wrote:
>
> >With shebang, comment and breaking, you end up with appr. seven lines.
> >I consider this a linear factor compared to 50. ;-)
>
> 1 #!/usr/bin/awk -f
> 2 {
> 3 printf "%s %s\n", strftime("%x %X"), $0;
> 4 fflush;
> 5 }
>
> Which is exactly an order of magnitude away from 50.
but doesn't allow you to pass in the strftime format.
Anyways, what I wanted to say with my initial shell function with the
sed was: you sure that getting this thing, compiling it, putting it
on my path and whatnot is better/simple than just, uh, hacking a
tiny shell fragment that'll suit your needs?
Remember the unix koans and whatnot.
Have a great day,
-Martin
Home |
Main Index |
Thread Index |
Old Index