Home > Mobile >  How to Remove # from file for the machting keyword using sed
How to Remove # from file for the machting keyword using sed

Time:01-06

I have a file which contains following

# this is temp file

# tempvalue = 0

I want to uncomment tempvalue and change value of tempvalue to 1

# this is temp file

tempvalue = 1

CodePudding user response:

Try it:

sed -i 's/# tempvalue = 0/tempvalue = 1/g' file_name
  • Related