[clug] IO redirection

Bryan Kilgallin (iiNet) kilgallin at iinet.net.au
Sun Sep 17 12:06:07 UTC 2017

OK Eyal:

> What command did you run to try to "execute input" and how did it fail?

In fish, the following is a valid command.
echo Testing.

So I put that command into a "Test.txt" text file.

And in a terminal window, I entered the following.
exec <Test.txt

Resulting in the following screen output.
        exec -- execute command in current process

        exec COMMAND [OPTIONS...]

        exec replaces the currently running shell with a new command. On
        successful completion, exec never returns. exec cannot be used 
        a pipeline.

        exec emacs starts up the emacs text editor, and exits fish. When
        emacs exits, the session will terminate.


What is the appropriate way to take instructions from a file, and do them?

> For example, this command:
>      sort <infile >outfile
> should "read standard input", sort it, then "write standard output". 
> does this work for you?

Yes, that worked fine!

More information about the linux mailing list