Link to home
Create AccountLog in
Avatar of ipconfig610
ipconfig610Flag for United States of America

asked on

linux search in file, find and replace text

I need to run a script that will search for files in a directory ending with .cfg.  For each .cfg file i need to search in the file and find and replace the following text:

FIND: reg.1.lineKeys="3"

REPLACE the 3 with a 1
ASKER CERTIFIED SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
You have a few typos so your script would not work.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account