bash: Use a file as standard input to a command.



  • Take into account the main readme for this section. README first.

    The default standard input on Linux is the keyboard, but a file can also be used.

    Standard input using keyboard. When you type in a echo command for example:

    $ echo blue moon
    blue moon
    

    Commands can also take standard input from a file.

    $ sort < inputfile
    
    I said blue moon of Kentucky
    Keep on shining
    These are lines used as input
    

Log in to reply
 

© Lightnetics 2024