0

So I'm trying to overwrite a text file that sort of looks like this:

FPS_CAP = 60 
RANDOM_SETTING = 1 
RANDOM_SETTING2 = 1

I want to be able to change the value of FPS_CAP to a different number. How do I do that?

Michael Butscher
  • 10,028
  • 4
  • 24
  • 25
Eric Feng
  • 3
  • 2

1 Answers1

0

I propose to use sed.

sed -i "s/FPS_CAP = 60/FPS_CAP = NEWVALUE/" /path/to/text/file.txt

If you have some more constraints or already started with an approach provide that info in the question.

PaulEdison
  • 897
  • 1
  • 15
  • 36