Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Unix Commands
Search
Joshua Paling
March 15, 2018
Programming
0
54
Unix Commands
Explains how to understand complex unix commands. Covers pipes, stdin, stdout, stderr, xargs, etc.
Joshua Paling
March 15, 2018
Tweet
Share
More Decks by Joshua Paling
See All by Joshua Paling
Bare minimum developers should know about SEO
joshuapaling
0
3.1k
Superstition Driven Development
joshuapaling
0
51
after-installfest.pdf
joshuapaling
0
33
Feeling like a better developer - AKA overcoming impostor syndrome
joshuapaling
2
1k
Other Decks in Programming
See All in Programming
Spatial Rendering for Apple Vision Pro
warrenm
0
110
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
500
MCP with Cloudflare Workers
yusukebe
2
220
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
830
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
780
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
140
From Translations to Multi Dimension Entities
alexanderschranz
2
130
fs2-io を試してたらバグを見つけて直した話
chencmd
0
240
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
400
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
169
14k
How STYLIGHT went responsive
nonsquared
95
5.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
A designer walks into a library…
pauljervisheath
204
24k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Making Projects Easy
brettharned
116
5.9k
The Invisible Side of Design
smashingmag
298
50k
How GitHub (no longer) Works
holman
311
140k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Transcript
JOSS @joshuapaling
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c 'prettier --single- quote --trailing-comma es5 --write %; git add %'
✂ --
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c 'prettier --single- quote --trailing-comma es5 --write %; git add %'
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c 'prettier --single- quote --trailing-comma es5 --write %; git add %'
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
<STAGED FILES> | <THAT ARE JS / JSX> | <NOT
IN PUBLIC DIR> | <AND FOR THOSE FILES AS %…> ‘ <FORMAT THEM WITH PRETTIER> ; <STAGE THEM FOR THIS COMMIT>'
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c 'prettier --single- quote --trailing-comma es5 --write %; git add %'
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c 'prettier --single- quote --trailing-comma es5 --write %; git add %'
None
010100010101111001010 101001010010101010100 101001010111101010100
None
The quick brown fox jumped over the lazy dog.
Software dev and “Hello Hungry, I’m Dad” enthusiast. resume.txt
alert(“you have know idea what you’re getting in to”) helloWorld.js
None
None
/dev/null /dev/random /dev/zero
None
None
None
/dev/null /dev/random /dev/zero
The quick brown fox jumped over the lazy dog. /dev/null
/dev/random /dev/zero
1. Small, composable ⚒ 2. = Stream of
STDIN STDOUT STDERR
STANDARD INPUT STANDARD OUTPUT STANDARD ERROR
STANDARD INPUT STANDARD OUTPUT STANDARD ERROR
1. Small, composable ⚒ 2. = Stream of 3. 3
streams: IN, OUT, ERR
STANDARD INPUT STANDARD OUTPUT STANDARD ERROR
STANDARD INPUT STANDARD OUTPUT STANDARD ERROR /dev/null
STANDARD INPUT STANDARD OUTPUT STANDARD ERROR
STANDARD INPUT STANDARD OUTPUT STANDARD ERROR
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
> anywhere.txt
>> anywhere.txt
2> anywhere.txt
2>> anywhere.txt
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
> anywhere.txt < anywhere.txt
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
1. Small, composable ⚒ 2. = Stream of 3. 3
streams: IN, OUT, ERR 4. ↔ with <, >, 2>
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c 'prettier --single- quote --trailing-comma es5 --write %; git add %'
None
None
|
| ls -1 grep ‘res’
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
1. Small, composable ⚒ 2. = Stream of 3. 3
streams: IN, OUT, ERR 4. ↔ with <, >, 2> 5. | | |
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c 'prettier --single- quote --trailing-comma es5 --write %; git add %'
None
None
None
None
subl stdin XgKkGs.txt
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
1. Small, composable ⚒ 2. = Stream of 3. 3
streams: IN, OUT, ERR 4. ↔ with <, >, 2> 5. | | | 6. xargs: STDIN to ARGUMENTS
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c 'prettier --single- quote --trailing-comma es5 --write %; git add %'
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c 'prettier --single- quote --trailing-comma es5 --write %; git add %'
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
None
None
None
None
README.md client/src/components/nav/Nav.jsx client/src/reducers/consideration.js public/index.js
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
<STAGED FILES> | grep -E '.*\\.(js|jsx)$' | grep -v ^public/
| xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
<STAGED FILES> | grep -E '.*\\.(js|jsx)$' | grep -v ^public/
| xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
<STAGED FILES> | grep -E '.*\\.(js|jsx)$' | grep -v ^public/
| xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
<STAGED FILES> | <THAT ARE JS / JSX> | grep
-v ^public/ | xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
README.md client/src/components/nav/Nav.jsx client/src/reducers/consideration.js public/index.js
README.md client/src/components/nav/Nav.jsx client/src/reducers/consideration.js public/index.js
client/src/components/nav/Nav.jsx client/src/reducers/consideration.js public/index.js
<STAGED FILES> | <THAT ARE JS / JSX> | grep
-v ^public/ | xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
<STAGED FILES> | <THAT ARE JS / JSX> | grep
-v ^public/ | xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
client/src/components/nav/Nav.jsx client/src/reducers/consideration.js public/index.js
client/src/components/nav/Nav.jsx client/src/reducers/consideration.js public/index.js
client/src/components/nav/Nav.jsx client/src/reducers/consideration.js public/index.js
client/src/components/nav/Nav.jsx client/src/reducers/consideration.js
<STAGED FILES> | <THAT ARE JS / JSX> | <NOT
IN PUBLIC DIR> | xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
<STAGED FILES> | <THAT ARE JS / JSX> | <NOT
IN PUBLIC DIR> | xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
client/src/components/nav/Nav.jsx client/src/reducers/consideration.js
<STAGED FILES> | <THAT ARE JS / JSX> | <NOT
IN PUBLIC DIR> | xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
<STAGED FILES> | <THAT ARE JS / JSX> | <NOT
IN PUBLIC DIR> | <AND FOR THOSE FILES AS %…> ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
<STAGED FILES> | <THAT ARE JS / JSX> | <NOT
IN PUBLIC DIR> | <AND FOR THOSE FILES AS %…> ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
<STAGED FILES> | <THAT ARE JS / JSX> | <NOT
IN PUBLIC DIR> | <AND FOR THOSE FILES AS %…> ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
<STAGED FILES> | <THAT ARE JS / JSX> | <NOT
IN PUBLIC DIR> | <AND FOR THOSE FILES AS %…> ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %’
<STAGED FILES> | <THAT ARE JS / JSX> | <NOT
IN PUBLIC DIR> | <AND FOR THOSE FILES AS %…> ‘ <FORMAT THEM WITH PRETTIER> ; <STAGE THEM FOR THIS COMMIT>'
1. Small, composable ⚒ 2. = Stream of 3. 3
streams: IN, OUT, ERR 4. ↔ with <, >, 2> 5. | | | 6. xargs: STDIN to ARGUMENTS
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c 'prettier --single- quote --trailing-comma es5 --write %; git add %'
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c 'prettier --single- quote --trailing-comma es5 --write %; git add %'
git diff --staged --diff- filter=dx --name-only HEAD | grep -E
'.*\\.(js|jsx)$' | grep -v ^public/ | xargs -I % sh -c ‘ prettier --single-quote -- trailing-comma es5 --write %; git add %'
<STAGED FILES> | <THAT ARE JS / JSX> | <NOT
IN PUBLIC DIR> | <AND FOR THOSE FILES AS %…> ‘ <FORMAT THEM WITH PRETTIER> ; <STAGE THEM FOR THIS COMMIT>'
✂ --