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
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
610
EMになってからチームの成果を最大化するために取り組んだこと/ Maximize team performance as EM
nashiusagi
0
100
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
120
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
1
100
Ethereum_.pdf
nekomatu
0
470
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
役立つログに取り組もう
irof
28
9.6k
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
480
イベント駆動で成長して委員会
happymana
1
340
Jakarta EE meets AI
ivargrimstad
0
220
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
136
6.6k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Facilitating Awesome Meetings
lara
50
6.1k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Adopting Sorbet at Scale
ufuk
73
9.1k
Fireside Chat
paigeccino
34
3k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
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>'
✂ --