Re: Linking two files together

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/26/2010 01:41 PM, Rector, David wrote:
> Mike,
>
> Thanks for the tip. I think there may be something here I can use.
>
> However, I am not as familiar with pipes and streams as I would like
> to be.
>
> Is it possible to use cat so the multiple files will pipe to something
> that my app can open. E.g. my apps don't operate on the standard input
> stream, they need to open the file, then scan back and forth within the file.

Yes.  You can use:

    cat file1 file2 file3 | my_app /dev/stdin

or:

    my_app <(cat file1 file2 file3)

In the latter case, the argument actually passed to my_app is of
the form "/dev/fd/63".  bash sets up the pipe on an arbitrary
file descriptor and passes the corresponding /dev/fd/* argument.

In either case, caveats about seeking in a pipe apply.

-- 
Bob Nichols     "NOSPAM" is really part of my email address.
                 Do NOT delete it.

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux