Browse Source

output continued and EOF

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

+ 13
- 0
sep21-conditionals.md View File

@@ -44,4 +44,17 @@ 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

$ cat realfile fakefile > cat_stdout 2> cat_stderr # 2> redirects stderr

$ echo "new contents" >> file # append to file
```

## Edit a scratch file with EOF

```
$ cat <<EOF | sort # edit a scratch file and pipe to sort
>input
>more input
>EOF
```

Loading…
Cancel
Save