"Strong Scripting Skills" - a definition? - sunday

Danny Howard dannyman at toldme.com
Tue Jan 27 14:38:39 PST 2004


On Tue, Jan 27, 2004 at 01:37:41PM -0800, Robert Hajime Lanning wrote:
> <quote who="Danny Howard">
> >>   root 24570     1  0   Oct 31 ?        0:10 /usr/local/apache/bin/httpd
> >> -DSSL
> >> defang  7665   212  0 07:03:02 ?        0:14 /bin/perl -w mimedefang.pl
> >> -server
> >>
> >> This is the problem with choosing a field.  Hint, look at the process
> >> start time.  This maybe avoided with options to ps, I haven't looked.
> >> This is "ps -ef" on Solaris.  The Linux "ps auxw" and "ps -ef" the
> >> start time would be "Oct31", so, it is not an issue there.
> >
> > That looks like a job for cut(1).
> >
> > -d
> 
> That is also based on field count.

What inferior OS are you running?

[...]
     The options are as follows:

     -b list
             The list specifies byte positions.

     -c list
             The list specifies character positions.
[...]

On FreeBSD, which tends toward the vanilla, you can 'cut -c -20,40-' or
whatever.  It is kind of overshadowed by its more powerful brethren, but
sometimes you just want to cut by character position.  And as Unix
commands goes, it has such an unusually straightforward name.

-danny



More information about the Baylisa mailing list