grep . regular expression _ anchors $ and ^ (meta characters)

commandline session $ 4.2.20 29 530—> grep -h ‘^sort’ worked $ 4.2.20 30 531—> grep -h ‘sort^’ worked $ 4.2.20 31 532—> grep -h ‘sort$’ worked Bubble sort Selection sort Insertion sort Shell sort Comb sort Merge sort Heapsort Quicksort Counting sort Bucket sort Radix sort Distribution sort Timsort $ 4.2.20 32 533—> grep -h …

grep . dot meta character

commandline session $ 4.2.20 37 537—> grep rt worked Bubble sort Selection sort Insertion sort Shell sort Comb sort Merge sort Heapsort Quicksort Counting sort Bucket sort Radix sort Distribution sort Timsort $ 4.2.20 38 538—> grep p.rt worked $ 4.2.20 39 539—> grep ..rt worked Bubble sort Selection sort Insertion sort Shell sort Comb …

grep . global regular expression print . (name of file)

commandline session $ 4.2.20 15 515—> grep -L ar /usr/sbin/* /usr/sbin/add-shell /usr/sbin/cracklib-format /usr/sbin/remove-shell /usr/sbin/su-to-root /usr/sbin/tzconfig /usr/sbin/update-grub /usr/sbin/update-grub2 /usr/sbin/update-icon-caches /usr/sbin/update-icon-caches.gtk2 $ 4.2.20 16 516—> $ 4.2.20 12 512—> ls /usr/sbin/ | grep -l ar (standard input) $ 4.2.20 13 513—> grep -l ar /usr/sbin/ $ 4.2.20 14 514—> grep -l ar /usr/sbin/* /usr/sbin/a2dismod /usr/sbin/a2dissite /usr/sbin/a2enmod /usr/sbin/a2ensite …

grep . global regular expression print

commandline session $ 4.2.20 1 501—> ls /usr/sbin/ | grep kernel $ 4.2.20 2 502—> ls /usr/sbin/ | grep ker cracklib-packer cracklib-unpacker $ 4.2.20 3 503—> ls /usr/sbin/ | grep linux $ 4.2.20 4 504—> ls /usr/sbin/ | grep lin update-ccache-symlinks $ 4.2.20 5 505—> ls /usr/sbin/ | grep li cracklib-check cracklib-format cracklib-packer cracklib-unpacker create-cracklib-dict …