sed replace line numbers code example
Example 1: sed replace number
Just use one of following commands for replacing a number of:
sed "s/[0-9]//" f.txt #One single digit as 1
sed "s/[0-9]\+//" f.txt #Further digits as 837, specifying match repetition "\+"
sed "s/[0-9]\+\.[0-9]\+]//" file.txt #Float type with decimals
Example 2: sed replace with no line
Use d option at the end of sed command string for deleting line of matches.
sed -i "" "s/matching_pattern/d" file.txt