[Smaug] A quick scripting puzzle
Thomas Leavitt
thomas at thomasleavitt.org
Sat Nov 19 15:24:17 PST 2005
No tail -r here.
thomas at thomasleavitt [/home/thomas]$ tail -r
tail: invalid option -- r
Try `tail --help' for more information.
thomas at thomasleavitt [/home/thomas]$
Thomas
On Sat, 2005-11-19 at 14:35 -0800, smaug-request at lists.svlug.org wrote:
> Message: 7
> Date: Sat, 19 Nov 2005 14:34:58 -0800
> From: Dash McElroy <dmcelroy at bayfed.com>
> Subject: Re: [Smaug] A quick scripting puzzle
> To: Dash McElroy <dmcelroy at bayfed.com>
> Cc: smaug at lists.svlug.org
> Message-ID: <E2744D9A-FC97-431B-8942-084D62717203 at bayfed.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> One more:
>
> echo `cal|tail -r`|colrm 3
>
> Check the tail -r output!
>
> -Dash
>
>
> On Nov 18, 2005, at 6:04 PM, Dash McElroy wrote:
>
> > LASTSUNDAY=`cal|colrm 3|tail -c4`
> >
> > -Dash
> >
> >
> > On Nov 18, 2005, at 11:29 AM, cerise at armory.com wrote:
> >
> >> More than matched, actually. Anthony's needs the echo.
> >>
> >> Although, technically, it's cheating slightly to use -2 instead of
> -
> >> n 2 since
> >> the maintainers of GNU coreutils have been trying to push -2 into
> >> obsolescence
> >> for some unknown reason.
> >>
> >> Even with that mod, you still win.
> >>
> >> -Phil/CERisE
> >>
> >> On Fri, Nov 18, 2005 at 10:55:20AM -0800, Dash McElroy wrote:
> >>> I matched it:
> >>>
> >>> LASTSUNDAY=`cal|tail -2|head -c2`
> >>>
> >>> v.s.
> >>>
> >>> LASTSUNDAY=`cal|rev`|rev|cut -b-2
> >>>
> >>> -Dash
> >>>
> >>>
> >>> On Nov 18, 2005, at 9:03 AM, Rick Moen wrote:
> >>>
> >>>> Quoting Anthony Ettinger (apwebdesign at yahoo.com):
> >>>>
> >>>>> echo `cal|rev`|rev|cut -b-2
> >>>>
> >>>> Elegant! I suspect that's going to be difficult to beat.
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> Smaug mailing list
> >>>> Smaug at lists.svlug.org
> >>>> http://lists.svlug.org/lists/listinfo/smaug
> >>>> Smaug home page: http://www.scruz.org/
> >>>
> >>>
> >>> _______________________________________________
> >>> Smaug mailing list
> >>> Smaug at lists.svlug.org
> >>> http://lists.svlug.org/lists/listinfo/smaug
> >>> Smaug home page: http://www.scruz.org/
> >>
> >> _______________________________________________
> >> Smaug mailing list
> >> Smaug at lists.svlug.org
> >> http://lists.svlug.org/lists/listinfo/smaug
> >> Smaug home page: http://www.scruz.org/
> >
> >
> > _______________________________________________
> > Smaug mailing list
> > Smaug at lists.svlug.org
> > http://lists.svlug.org/lists/listinfo/smaug
> > Smaug home page: http://www.scruz.org/
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Smaug mailing list
> Smaug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/smaug
> Smaug home page: http://www.scruz.org/
>
>
> End of Smaug Digest, Vol 133, Issue 35
> **************************************
>
More information about the Smaug
mailing list