On Mon, Oct 08, 2001 at 02:16:52PM -0400, rpjday <[EMAIL PROTECTED]> wrote: | On Mon, 8 Oct 2001, Kathy Bieltz wrote: | > I have some scripts that run on several | > Unix platforms and run on RH 6.2 just | > fine. | > I recently tried to run the following on | > my RH 7.1 platform and had my program | > core dump with a segmentation fault because | > it is reading >/dev/null as the first argument. | > | > myprogram <<! >/dev/null | > first_argument | > ! | > | as a first guess, i would have initially tried | | $ myprogram > /dev/null <<! | | etc etc ... just to play it safe with the way bash handles | the delimiter for the here document. does that make a difference?
Perhaps, but it shouldn't. Definitely a bug in bash. Hardly the first one. This also fails under bash: < foo ( ls ) i.e. run an ls in a subshell with stdin from foo. Works in any real shell. And yes, that's a perfectly sane construct if you're generating shell commands in a script such as stringing filters together, or embedding a complex command in a Makefile like so: funnycmd = if something; then this; else that; fi; something else now foo: <file ( $(funnycmd) ) Yes I know there are workarounds. They shouldn't be needed. -- Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/ Oats: a grain which is commonly given to horses, but in Scotland supports the people. - Johnson, Definition Dictionary _______________________________________________ Seawolf-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/seawolf-list