what is difference between 2 commands - Redhat

This is a discussion on what is difference between 2 commands - Redhat ; What is the difference between - cat > allinfo and cat newinfo >> allinfo thanks...

+ Reply to Thread
Results 1 to 3 of 3

Thread: what is difference between 2 commands

  1. what is difference between 2 commands

    What is the difference between -
    cat < newinfo >> allinfo
    and
    cat newinfo >> allinfo
    thanks



  2. Re: what is difference between 2 commands


    "Bob" wrote in message
    news:433a07f0$0$276$8046368a@newsreader.iphouse.ne t...
    > What is the difference between -
    > cat < newinfo >> allinfo
    > and
    > cat newinfo >> allinfo
    > thanks

    No difference.

    --
    Herb Stein
    herb@herbstein.com



  3. Re: what is difference between 2 commands

    "Bob" wrote: <433a07f0$0$276$8046368a@newsreader.iphouse.net>

    > What is the difference between -
    > cat < newinfo >> allinfo
    > and
    > cat newinfo >> allinfo
    > thanks


    The 'cat' command will accept a filename argument and read the contents of the
    file, or it will read from standard input if no filename argument is provided.
    In the first case no filename is provided to 'cat' so it reads from standard
    input which has been redirected from 'newinfo'. In the second case 'cat' reads
    directly from the file specified by the filename argument. Of course if you do
    this with a command that does not take a filename argument, then the only way to
    provide the contents of a file to the command would be via input redirection.


+ Reply to Thread