technote:std
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| technote:std [2020/03/29 23:56] – created Scott Cunliffe | technote:std [2025/01/21 22:07] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| When a command is executed via an interactive shell, the streams are typically connected to the text terminal on which the shell is running, but can be changed with redirection or a pipeline. | When a command is executed via an interactive shell, the streams are typically connected to the text terminal on which the shell is running, but can be changed with redirection or a pipeline. | ||
| + | |||
| + | ===== Stdin ===== | ||
| + | |||
| + | Standard input is a stream from which a program reads its input data. The program requests data transfers by use of the read operation. | ||
| + | |||
| + | Unless redirected, standard input is inherited from the parent process. In the case of an interactive shell, that is usually associated with the keyboard. | ||
| + | |||
| + | For processes that use a file as input, that file data may be passed (or piped) in through the stdin channel. | ||
| + | |||
| + | ==== Input via Stdin ==== | ||
| + | |||
| + | Piping an input file myVolumes.csv via stdin to TMSS10Sync. | ||
| + | |||
| + | < | ||
| + | TMSS10Sync -S user: | ||
| + | </ | ||
| + | |||
| + | ===== Stdout ===== | ||
| + | |||
| + | Standard output is a stream to which a program writes its output data. | ||
| + | |||
| + | Unless redirected, standard output is inherited from the parent process. | ||
| + | |||
| + | ==== Output Via Stdout ==== | ||
| + | |||
| + | Redirecting stdout from TMSS10Sync to file sync_stdout.txt. | ||
| + | |||
| + | < | ||
| + | TMSS10Sync -S user: | ||
| + | </ | ||
| + | |||
| + | Redirecting stdout from TMSS10Sync to file sync_stdout.txt. | ||
| + | |||
| + | < | ||
| + | TMSS10Sync -S user: | ||
| + | </ | ||
| + | |||
| + | ===== Stderr ===== | ||
| + | |||
| + | Standard error is another output stream typically used by programs to output error messages or diagnostics. It is a stream independent of standard output and can be redirected separately. | ||
| + | |||
| + | ==== Output Via Stderr ==== | ||
| + | |||
| + | Redirecting stderr from TMSS10Sync to file sync_stderr.txt. | ||
| + | |||
| + | < | ||
| + | TMSS10Sync -S user: | ||
| + | </ | ||
| + | |||
| + | Redirecting stdout from TMSS10Sync to file sync_stderr.txt. | ||
| + | |||
| + | < | ||
| + | TMSS10Sync -S user: | ||
| + | </ | ||
| + | |||
| + | ===== Concatenating Stdout and Stderr ===== | ||
| + | |||
| + | Depending on the purpose of the output from stdout and stderr it is possible to combine both streams to the one output file. | ||
| + | |||
| + | < | ||
| + | TMSS10Sync -S user: | ||
| + | </ | ||
| + | |||
technote/std.1585526196.txt.gz · Last modified: 2025/01/21 22:07 (external edit)
