appending a file to stdin - Help

This is a discussion on appending a file to stdin - Help ; Is there a command that appends the contents of a file to its standard input and sends this to standard output?...

+ Reply to Thread
Results 1 to 6 of 6

Thread: appending a file to stdin

  1. appending a file to stdin

    Is there a command that appends the contents of a file to its standard input and sends this to standard output?

  2. Re: appending a file to stdin

    How about

    cat - myfile


    "Angel Tsankov" wrote in message
    news:45017af0$3$75030$14726298@news.sunsite.dk...
    > Is there a command that appends the contents of a file to its standard

    input and sends this to standard output?



  3. Re: appending a file to stdin

    "Angel Tsankov" writes:

    >Is there a command that appends the contents of a file to its standard input and sends this to standard output?


    No idea what you mean.
    cat file1 file2 file3
    will output to stdout the concatenation of file1 file2 file3 in order.
    If you want that sent to program
    cat file1 file2 file3|program



  4. Re: appending a file to stdin

    > How about
    >
    > cat - myfile


    Great! Thanks!

  5. Re: appending a file to stdin

    Angel Tsankov wrote:
    >
    > Is there a command that appends the contents of a file to its
    > standard input and sends this to standard output?


    cat - filename

    note spaces.

    Please limit your line lengths to something under 72. 65 is good.

    --
    "The smaller aperture of the lid has been designed to prevent
    hedgehogs from entering the McFlurry container in the
    unfortunate incidence that the lid is littered"
    -- McDonalds, as quoted in Time, 2006-09-11


  6. Re: appending a file to stdin

    At Fri, 8 Sep 2006 17:15:12 +0300 "Angel Tsankov" wrote:

    >
    > Is there a command that appends the contents of a file to its standard input and sends this to standard output?
    >


    cat - somefile

    Example:

    ls -l | cat - ~/.login | a2ps -2

    See 'man cat' for more details.


    --
    Robert Heller -- 978-544-6933
    Deepwoods Software -- Linux Installation and Administration
    http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
    heller@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk


+ Reply to Thread