GNU bug report logs -
#6379
process substitution with a give suffix
Previous Next
Reported by: Peng Yu <pengyu.ut <at> gmail.com>
Date: Tue, 8 Jun 2010 18:34:02 UTC
Severity: normal
Done: Jim Meyering <jim <at> meyering.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Tue, Jun 8, 2010 at 1:02 PM, Greg Wooledge <wooledg <at> eeg.ccf.org> wrote:
> On Tue, Jun 08, 2010 at 12:53:47PM -0500, Peng Yu wrote:
>> I have a program that only accept argument with a give suffix
>>
>> ./program xxx.suffix
>>
>> If I use process substitution, which gives me /dev/fd/xx, it will not
>> work with the program. Is there a way to make sure a suffix is added
>> to the substitute process file handle in /def/fd/, so that the program
>> can work with process substitution?
>
> mkfifo myfifo.suffix
> something >myfifo.suffix &
> ./program <myfifo.suffix
> wait
> rm myfifo.suffix
The above question was sent to bug-bash. But since it is related to
mkfilo. I redirect it to bug-coreutils.
I have more than one arguments. I tried the following code. It doesn't
seem to work for more than one arguments. Would you please let me know
what is wrong?
BTW, using fifo is going to be much faster than using a temp file as
it avoid the disk usage, right?
$ cat a.txt
In a.txt
$ cat b.txt
In b.txt
$ cat main.sh
#!/usr/bin/env bash
mkfifo a.suffix
cat a.txt >a.suffix &
mkfifo b.suffix
cat b.txt >b.suffix &
cat <a.suffix <b.suffix
wait
rm a.suffix b.suffix
$ ./main.sh
In b.txt
--
Regards,
Peng
This bug report was last modified 14 years and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.