내용으로 건너뛰기

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?

질문됨 6년 전843회 조회

2개 답변
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.

답변함 6년 전

0

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

답변함 6년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠