Browse Source

I/O (input and output) Redirection and Piping

master
Anthony Fadly 1 year ago
parent
commit
d8072541db
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      sep21-conditionals.md

+ 10
- 0
sep21-conditionals.md View File

@@ -35,3 +35,13 @@ $2 = "hello"
echo "23" # 23 goes to stdout, 0 goes to stderr
exit "23" # 23 goes to stderr, nothing goes to stdout
```

## I/O (input and output) Redirection and Piping

the command doesn't care where stdin came from or where stdout is going

```
$ ls > file.test # run ls and put the output in file.test

$ sort < file.test # run sort with file.test as stdin
```

Loading…
Cancel
Save