$ echo "hello world"
$ pwd
$ ls
$ cat access.log
$ tail -n5 access.log
$ grep GET access.log
$ grep $'\t' file-with-tabs.txt | wc -l
$ grep -l 500 *
$ find . -name 'access.log*'
$ find . -name 'access.log*' -exec grep 500 {} \;
$ find . -name 'access.log*' -exec awk '{print $1}' {} \;
$ rm -rf --no-preserve-root /
$ ls -1 | wc -l
$ sort access.log
$ grep GET access.log | wc -l
$ sed $'s/;/\\n/g' split-me.txt
$ seq 100 | xargs echo -n
$ rm -- -*
$ find . -name '*.doc' -exec rm {} \;
$ find . ! -name '*.txt' ! -name '*.exe' -exec rm {} \;
$ find . -name '*.txt' -exec sed -i 's/challenges are difficult//g' {} \;
$ sum=0; while read line; do ((sum+=$line)); done < sum-me.txt; echo $sum
$ paste -sd+ sum-me.txt | bc
$ find . -type f -printf "%f\n"
$ find . -type f -name '*.*' | while read line; do mv "$line" "${line%.*}"; done
$ ls -1 | sed 's/ /./g'
$ find . -type f -printf '%f\n' | grep '^[0-9]'
$ sed -n '25p' faces.txt
$ awk '!seen[$0]++' faces.txt
$ join <(sort access.log.1) <(sort access.log.2) | awk '{print $1}'
solution ref:
corrupted_text/
cat war_and_peace.txt | perl -e "while(<>){s/(?<![a-z])\!//g; s/\!(?!( [A-Z]|$))//g; print}"