Git Bash cmds - Unix like (Wk 2 UCSD) Flashcards
pipe the output of cat foo.txt to wc command input
cat foo.txt | wc
what is a filter command
takes inputs and transforms, placed after unix pipe
count the number of files in a dir w/ the word fruit in them
ls | grep fruit | wc -l
count the number of unique lines in a txt file using pipes
uniq file.txt | wc -l
command to report process status
ps (has multiple options)
useful commands for text analysis
cat, grep, wc, sort, uniq, head, tail, cut, sed, find
head command
listing the first n lines of a text file
tail command
lists the last n lines of a text file or input stream
cut sommand
cut a portion of each line in a file
SED command (stream editor)
basic text transformations on an input stream
find command
quick searches in our file sys hierarchy