Le 29/10/2021 à 00:29, Greg Wooledge écrivait :
On Thu, Oct 28, 2021 at 08:33:22PM +, elettrino via Bug reports for the GNU
Bourne Again SHell wrote:
user@machine:~$ USER_INPUT='x[$(id>&2)]'
user@machine:~$ test -v "$USER_INPUT"
uid=1519(user) gid=1519(user) groups=1519(user),100(users)
us
On Thu, Oct 28, 2021 at 08:33:22PM +, elettrino via Bug reports for the GNU
Bourne Again SHell wrote:
>
> user@machine:~$ USER_INPUT='x[$(id>&2)]'
> user@machine:~$ test -v "$USER_INPUT"
> uid=1519(user) gid=1519(user) groups=1519(user),100(users)
> user@machine:~$
Whoo. This uses a feature
On Thu, 28 Oct 2021 20:33:22 +
elettrino via Bug reports for the GNU Bourne Again SHell
wrote:
> The following shows an example of bash testing a quoted string and as a
> result executing a command embedded in the string.
>
> Here I used the command "id" to stand as an example of a command
The following shows an example of bash testing a quoted string and as a result
executing a command embedded in the string.
Here I used the command "id" to stand as an example of a command. The output of
id on this machine was as follows:
user@machine:~$ id
uid=1519(user) gid=1519(user) groups=1
On 10/27/21 10:09 PM, Kerin Millar wrote:
This is to be expected. It works the same way as in other languages, such as C.
You should use the operator that reflects your intent.
Understood - thx for the explanation.
--
Toralf