Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by www.cyberciti.biz #
 
PREVIOUS NEXT
Tagged: #sed #replace #number
ADD COMMENT
Topic
Name
5+1 =