i have a file sample.txt containing
i want to delete lines starting with 123 neglecting spaces and tabs.
but not lines containing 123. i.e.
i want files sample.txt as
help me
thanxx
i have a file sample.txt containing
i want to delete lines starting with 123 neglecting spaces and tabs.
but not lines containing 123. i.e.
i want files sample.txt as
help me
thanxx
Try with grep..
grep -v '^[0-9]' inputfile
sed 's/^ *//g;/^123/d' input_file
--ahamed
thnx for reply !
awk '$1!=123' infile
or
awk '$1!="abc"' infile
for text