Grep one liners

insert tab in grep search field
Do cntrl-v then cntrl-i to insert a tab

filter characters that break grep
If you are searching files that may contain 'odd' characters in them (e.g. Windows .inf driver files) these break grep. Basically it wont error or show anything is wrong but just wont return a match in the file. To get around this filter through tr first.

cat "*.inf" | tr -cd '\11\12\15\40-\176' | grep -Eir '[V][EI][ND]_[A-Z0-9]{4}&|=.*\*[A-Z0-9]{7,8}'

extract contents of pst files using libpst-0.6.52
=get device/vendor codes of hardware= sudo lspci -n | grep -Eio '[0-9A-Z]{4}:[0-9A-Z]{4}' > /tmp/pci

sudo hwinfo | grep "MODALIAS=acpi" | grep -vE "dev|PNP|LNX|INT"

=Replace only LINE X matching=

These are for third line matching only, /3 controls match line

all into pattern buffer
sed ':a N;$!ba; s/url =>[^\n]*/url => http:\/\/www.test.com/3' /tmp/automatic.conf

convert to string and back
cat /tmp/automatic.conf | tr "\n" "#" | sed "s/url =>[^#]*/url => http:\/\/www.test.com/3" | tr "#" "\n"