public
Created

Bash history from the command line talk at RubyMKE 4/16

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
ls
clear
\ls
type ls
alias ls='ls -1'
ls
type ls
which ls
type cd
type git
type sh
man man
man ls
type git
ls asjkdhf
touch tmp
cp tmp tmp2
touch temp
ls
alias ls='ls -aF'
ls
ln -s tmp temp
ln -s tmp temp2
ls
rm temp2
ls
rm temp
ls
echo "file1" > file1.tmp
echo "file1"
echo `ls`
echo $(ls)
cat <(ls)
cp -r vendor/ vendor-new
diff vendor vendor-new/
cd vendor-new/
echo "file1" > file1
cd ..
echo "file1" > file1
diff vendor vendor-new/
cat <(ls)
cat Gemfile | wc -l
type wc
man wc
cat Gemfile | wc -w
wc -w Gemfile
wc -w Gemfile Gemfile.lock
wc -w *
wc -w * > stdout.txt
cat stdout.txt
wc -w * > stdout.txt 2> stderr.txt
apropos link
wc -w * > stdout.txt 2> stderr.txt
cat stdout.txt
cat stderr.txt
ls
wc -w * 2>> stderr.txt
cat stderr.txt
man tee
cat Gemfile | tee Gemfile.new | wc -w
more Gemfile.new
man tee
wc -l * |tee errors.txt
more errors.txt
wc -l * |tee errors.txt | wc -l
wc errors.txt
wc -l * |tee errors.txt 2>&1 | wc -l
wc -l * 2>&1 |tee errors.txt | wc -l
more errors.txt
find .
wc -l * 3>&1 1>&2 2>&3 |tee output.txt
more output.txt
ls -l
find .
ls
find app lib
ls
find app lib -name "*.rb"
ls
ls -l Gemfile*
ls *.rb
ls -R *.rb
ls -r *.rb
find app lib -name *.rb
type find
readlink -f /usr/bin/find
readlink /usr/bin/find
man readlink
readlink -F /usr/bin/find
readlink /usr/bin/find
ls -l /usr/bin/find
find . *.rb
find .
find . -name *.rb
find . -name "*.rb"
find app lib -name "*.rb"
touch app/controllers/something.rbs
find app lib -name "*.rb"|xargs
find app lib -name "*.rb"|xargs wc -l
find app lib -name "*.rb"|xargs -J % wc -l %
find app lib -name "*.rb"|xargs wc -l
grep -r class --include="*.rb"
grep -r --include="*.rb"
grep -r class --include="*.rb" .
grep -r "^[[:space:]]*class\b" --include="*.rb" .
grep -r "^[[:space:]]*class\b" --include="*.rb" app lib
grep -rh "^[[:space:]]*class\b" --include="*.rb" app lib
grep -rl "^[[:space:]]*class\b" --include="*.rb" app lib
find app lib -name "*.rb"|xargs grep -r "^[[:space:]]*class\b"
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\b"
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b"
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b"
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do grep -r "\b$class\b" app lib --include="*.rb"; find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do grep -r "\b$class\b" app lib --include="*.rb"; done
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo "$class"; done
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo "$class"; done
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do grep -r "\b$class\b" app lib --include="*.rb"; done
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do grep -lr "\b$class\b" app lib --include="*.rb"; done
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb"` $class; done
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb" | wc -l` $class ; done
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb" | wc -l` $class ; done| sort -n
cd ../discourse/
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb" | wc -l` $class ; done| sort -n
find app lib -name "*.rb"|xargs grep -h "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb" | wc -l` $class; done| sort -n
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b"
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" | sed 's/^[[:space:]]*//' | cut -d ' ' -f 2| while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb" | wc -l` $class ; done| sort -n
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" | sed 's/^[[:space:]]*//' | cut -d ' ' -f 2
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" | sed 's/^[[:space:]]*//' | cut -d ' ' -f 2| sort | uniq |while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb" | wc -l` $class ; done| sort -n
echo "hello world" | cut -f 1
echo "hello world" | cut -d " " -f 1
echo "hello world:hi" | cut -d " :" -f 1
echo "hello world:hi" | cut -d ":" -f 1

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.