Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14217 > unrolled thread

Re: cat<(echo text) not same as cat <(echo text)

Started byIlkka Virta <itvirta@iki.fi>
First post2018-06-04 12:07 +0300
Last post2018-06-04 12:07 +0300
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: cat<(echo text) not same as cat <(echo text) Ilkka Virta <itvirta@iki.fi> - 2018-06-04 12:07 +0300

#14217 — Re: cat<(echo text) not same as cat <(echo text)

FromIlkka Virta <itvirta@iki.fi>
Date2018-06-04 12:07 +0300
SubjectRe: cat<(echo text) not same as cat <(echo text)
Message-ID<mailman.1097.1528103273.1292.bug-bash@gnu.org>
On 4.6. 06:48, Edward Huff wrote:
> That is unexpected.
> 
> bash --version
> GNU bash, version 4.4.19(1)-release (x86_64-redhat-linux-gnu)

I assume you'd like Bash to behave like ksh here, and to expand the 
process expansion filename as a distinct word instead of concatenating 
it with the surrounding strings?

     $ bash -c 'cat<(echo foo)bar'
     bash: cat/dev/fd/63bar: No such file or directory

     $ ksh -c 'cat<(echo foo)bar'
     foo
     cat: bar: No such file or directory

In this case, it would make sense to separate the words and make it just 
work like a redirection. But in some cases you might want the filename 
prefixed with a string, e.g.:

     somecmd --file=<(echo something)

Ksh's behavior makes that impossible.

-- 
Ilkka Virta / itvirta@iki.fi

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web