mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-25 22:07:01 +00:00
Merge pull request #45 from chapmanjacobd/patch-3
Use ctrl+d instead of ctrl+c
This commit is contained in:
commit
51d112b5ce
20
README.md
20
README.md
@ -2860,12 +2860,26 @@ var=$((var+1))
|
|||||||
cat filename|rev|cut -f1|rev
|
cat filename|rev|cut -f1|rev
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Cat to a file
|
##### Create or replace a file with contents
|
||||||
```bash
|
```bash
|
||||||
cat >myfile
|
cat >myfile
|
||||||
let me add sth here
|
let me add sth here
|
||||||
exit by control + c
|
# exit with ctrl+d
|
||||||
^C
|
|
||||||
|
tee myfile
|
||||||
|
let me add sth else here
|
||||||
|
# exit with ctrl+d
|
||||||
|
```
|
||||||
|
|
||||||
|
##### Append to a file with contents
|
||||||
|
```bash
|
||||||
|
cat >>myfile
|
||||||
|
let me add sth here
|
||||||
|
# exit with ctrl+d
|
||||||
|
|
||||||
|
tee -a myfile
|
||||||
|
let me add sth else here
|
||||||
|
# exit with ctrl+d
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Clear the contents of a file (e.g. filename)
|
##### Clear the contents of a file (e.g. filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user