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
53
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
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
590
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
590
functionalなアプローチで動的要素を排除する
ryopeko
1
200
AHC041解説
terryu16
0
370
Оптимизируем производительность блока Казначейство
lamodatech
0
950
DMMオンラインサロンアプリのSwift化
hayatan
0
180
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
630
php-conference-japan-2024
tasuku43
0
430
Findy Team+ Awardを受賞したかった!ベストプラクティス応募内容をふりかえり、開発生産性向上もふりかえる / Findy Team Plus Award BestPractice and DPE Retrospective 2024
honyanya
0
140
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
130
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
はてなにおけるfujiwara-wareの活用やecspressoのCI/CD構成 / Fujiwara Tech Conference 2025
cohalz
3
2.7k
Featured
See All Featured
A Tale of Four Properties
chriscoyier
157
23k
Into the Great Unknown - MozCon
thekraken
34
1.6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
Side Projects
sachag
452
42k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Faster Mobile Websites
deanohume
305
30k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
BBQ
matthewcrist
85
9.4k
How to train your dragon (web standard)
notwaldorf
89
5.8k
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>'
✂ --