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
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
220
CSC305 Lecture 25
javiergs
PRO
0
130
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
920
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
3
1.1k
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
170
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
190
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
250
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
MCP with Cloudflare Workers
yusukebe
2
220
Beyond ORM
77web
2
290
Featured
See All Featured
Music & Morning Musume
bryan
46
6.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Rails Girls Zürich Keynote
gr2m
94
13k
Scaling GitHub
holman
458
140k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Done Done
chrislema
181
16k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Side Projects
sachag
452
42k
KATA
mclloyd
29
14k
Become a Pro
speakerdeck
PRO
26
5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
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>'
✂ --