bug-coreutils
[Top][All Lists]
Advanced

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

Re: One posibly "improvement" for date.c...


From: Ville solarius
Subject: Re: One posibly "improvement" for date.c...
Date: Tue, 18 Apr 2006 20:58:42 +0300

Ok, thanks guys about advices! Now i know how do thinks like that in
future - with simple way;)

Well, lookslike there are many ways to do that, so my patch is not nececary
My patch is userfriendly, but i dont know situation where normal user
should need that;)

So, thanks again!
- Solarius

On 18/04/06, Eric Blake <address@hidden> wrote:
> Ville solarius <ville.solarius <at> gmail.com> writes:
>
> >
> > Hi all!
> > Yesterday, i wrote very small patch for date-program(date.c), i peronaly
> needed
> > feature to strip out newline-sign at end of output. I hope it is
> > useful for whole project too, so it is free to use in date.
>
> >From any POSIX-compliant shell, this does what you are asking for,
> since command substitution strips trailing newlines:
> printf %s "$(date)"
>
> >
> > In fact, this is my first patch,so i just diff my date.c and cvs's
> > date.c, and i hope i did it right;) It is at end of this message, i
> > hope it works(like i sad, i havent do patches before;) Remember backup
> > your original date.c in case that i've done something wrong!)
>
> Thanks for the patch.  However, on this list, we prefer unified patches
> (diff -up), because context is essential for ensuring a patch applies
> cleanly.  Furthermore, as has been pointed out, the functionality
> you desire is already part of the shell, so it does not make sense
> to bloat date with this functionality.
>
> > PS. I personally needed it because i needed time stamp to my bash 
> > shellprompt
>
> Since you are using bash, read 'man bash' under the PROMPTING section
> - perhaps the \D{format} escape sequence in PS1 is a better solution to
> your needs.
>
> --
> Eric Blake
>
>
>
>
>
> _______________________________________________
> Bug-coreutils mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-coreutils
>




reply via email to

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