[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getconf _CS_PATH failure
From: |
Eli Schwartz |
Subject: |
Re: getconf _CS_PATH failure |
Date: |
Mon, 18 Jan 2021 16:12:30 -0500 |
On 1/18/21 3:59 PM, Jeffrey Walton wrote:
Hi Everyone,
Forgive my ignorance... According to
https://pubs.opengroup.org/onlinepubs/007904875/utilities/command.html
this is supposed to work:
$ command -p getconf _CS_PATH
getconf: Unrecognized variable `_CS_PATH'
Should the command be failing on Linux?
I don't see anywhere on that page that states a shell like bash is
required to implement the "command" utility in such a way that, if
"command -p getconf" is run, the "getconf" program being run will
recognize any particular variable.
"command -p getconf" succeeded -- it found the "getconf" program and ran
it. getconf then returned an error.
Maybe you should ask why _CS_PATH does not exist?
The answer to this could be found in the definition of getconf itself:
https://pubs.opengroup.org/onlinepubs/007904875/utilities/getconf.html
The following operands shall be supported:
system_var
A name of a configuration variable. All of the following variables
shall be supported:
- The names of the symbolic constants used as the name argument of
the confstr() function in the System Interfaces volume of IEEE
Std 1003.1-2001, without the _CS_ prefix.
Indeed, on my Linux system,
$ command -p getconf PATH
/bin:/usr/bin
--
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User
OpenPGP_signature
Description: OpenPGP digital signature