Re: posix ps (was Re: Adding `pgrep' and `pkill' to /usr/bin)

From: Stephen McKay (smckay_at_internode.on.net)
Date: 03/29/04

  • Next message: Albert Cahalan: "Re: posix ps (was Re: Adding `pgrep' and `pkill' to /usr/bin)"
    To: Harti Brandt <brandt@fokus.fraunhofer.de>
    Date: Mon, 29 Mar 2004 10:42:02 +1000
    
    

    On Sunday, 28th March 2004, Harti Brandt wrote:

    >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.

    Yes, that is a significant deficiency of the internationalisation scheme.
    That doesn't mean we should copy it though.

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

    Hopefully in the near future there will be a universally accepted default
    for ps options. Are you seriously suggesting that every script forevermore
    will have to put PERSONALITY=STANDARD (or similar) in front of a two
    character command name just to defeat this misfeature?

    >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 being desirable.

    I don't understand. I was suggesting that if end users want different
    flavours of output they can select them with command line switches and
    aliases (if this is an option at all). This is as opposed to allowing
    users to select the default via an environment variable, which would
    negatively impact the use of ps in scripts.

    I can't see why scripts would want to use anything but the standard options.
    You only want to parse one format.

    Stephen.
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: Albert Cahalan: "Re: posix ps (was Re: Adding `pgrep' and `pkill' to /usr/bin)"

    Relevant Pages