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
53
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
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
4
6k
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
24
12k
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
510
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
590
Tauriでネイティブアプリを作りたい
tsucchinoko
0
350
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
500
受け取る人から提供する人になるということ
little_rubyist
0
180
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
160
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.3k
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
4
1k
Featured
See All Featured
Six Lessons from altMBA
skipperchong
27
3.5k
Speed Design
sergeychernyshev
24
600
A designer walks into a library…
pauljervisheath
202
24k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Designing for humans not robots
tammielis
249
25k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
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>'
✂ --