Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Mar 2004 18:47:18 +0200 (CEST)
From:      Harti Brandt <brandt@fokus.fraunhofer.de>
To:        Stephen McKay <smckay@internode.on.net>
Cc:        Albert Cahalan <albert@users.sourceforge.net>
Subject:   Re: posix ps (was Re: Adding `pgrep' and `pkill' to /usr/bin) 
Message-ID:  <20040328184244.I10175@beagle.fokus.fraunhofer.de>
In-Reply-To: <200403280808.i2S88aJ7016011@dungeon.home>
References:  <p0602046abc879c5fe2f9@[128.113.24.47]> <20040325070120.GA67497@VARK.homeunix.com> <p06020494bc8a5738af2f@[128.113.24.47]> <200403280808.i2S88aJ7016011@dungeon.home>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 28 Mar 2004, Stephen McKay wrote:

SM>On Saturday, 27th March 2004, Garance A Drosihn wrote:
SM>
SM>>>$ PERSONALITY=freebsd ps -?
SM>>
SM>>Secondly, I personally am not fond of commands which COMPLETELY
SM>>change their behavior based on environment variables.  Different
SM>>options, different formats, different rules.
SM>
SM>Unifying ps on all Unices (including FreeBSD) is an excellent idea, and
SM>I fully support this.
SM>
SM>Using an environment variable (no matter what name is used) to switch
SM>between radically different personalities is an appalling idea.  No script
SM>can depend on the output of ps thereafter.

Well, that is just like LANG or LC_ALL. You cannot depend on parsing
utility output until you set LC_ALL=C, yet I have still to see a script
that does this.

If you happen to write a script for BSD syntax just put LC_ALL=C
PERSONALITY=BSD on top of it.

SM>If multiple personalities is a desirable trait (and it's not clear that it
SM>is) then command line switches and aliases are the correct mechanisms to
SM>use.

That would require to add that switch to all utility calls in a script
that have multiple personalities. Thats far from beeing desirable.

harti



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040328184244.I10175>