Salta al contenuto

Process Substitution not working with Linux 2 bash?

0

Does the bash provided with AWS Linux 2 not support process substitution? I have never used this feature previously, but now a circumstance has come up where it would be useful. But even the simplest demo fails, e.g.:

me$ cat <(date)
sh: syntax error near unexpected token `('

My shell say it's:

GNU bash, version 4.2.46(2)-release-(x86_64-koji-linux-gnu)

And fwiw my shell in /etc/passwd is /bin/bash, and anyway /bin/sh is just a symlink to /bin/bash.

Am I missing something? Or is Linux 2 really delivered with a bash that doesn't support this?

posta 6 anni fa843 visualizzazioni

2 Risposte
0

I understand what you are saying here, however:

  1. My shell really is bash, as I stated originally. Both "bash --version" and "sh --version" identify themselves to bash, as I quoted.

  2. shebang does not enter into the question; It doesn't work right from the shell prompt either.

con risposta 6 anni fa

0

Still, that gave me the clue I needed. Thanks!

con risposta 6 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.