mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-02 10:54:45 +00:00
Update cheatsheets
This commit is contained in:
17
sponge
Normal file
17
sponge
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# sponge
|
||||
|
||||
> Soak up the input before writing the output file.
|
||||
> More information: <https://manned.org/sponge>.
|
||||
|
||||
- Append file content to the source file:
|
||||
|
||||
`cat {{path/to/file}} | sponge -a {{path/to/file}}`
|
||||
|
||||
- Remove all lines starting with # in a file:
|
||||
|
||||
`grep -v '^{{#}}' {{path/to/file}} | sponge {{path/to/file}}`
|
||||
Reference in New Issue
Block a user