02/18 date +"x%m/x%d" | sed 's/x0*//g'
\_ Why not just say "2/18"?
\_ strangely enough, this is a university with an intl
reputation and many intl students. this is also a
university with many pretentious students who want
you to think that they are suave and intl.
\_ You mean pretentious? If its ok with you, I'll just
stick with "2/18" for today.
\_ Why not say "18/2"?
\_ Why not say
date +"%m/%d" | sed 's/0\([0-9]\)/\1/g'
\_ cuz you can use 'x' as magic marker.
\_ is it permanent or one of those water soluble ones?
\_ but using markers is inelegant.
\_ Actually its a nice trick and easier to read.
\_ but it doesn't teach you what to do if you don't get
to control the initial output format. The second
one does.
\_ but you do get to control date's output format via
'+'. the date and sed are meant to work together.
\_ You're still missing the point.
\_ I see your point. You're being academic.
Out here in the RW, I think it's a nice
trick and makes it easier to read. I'm
not in some CS class. I work and like to
see the little tricks other people use in
their work which may apply to mine. |