I want to replace a specific occurence of the word "Metal" in a number of .mac-files. As far as I saw these are text files.
First example file:
Size : 24mm 1547856 Metal
Colour : red
Number : 1547856 Metal
Second example file:
Size : 26mm 2658915 Metal
Colour : blue
Number : 2658915 Metal
I want to replace Number : 1547856 Metal
with Number : 1547856 Steel
in the first file and Number : 2658915 Metal
with Number : 2658915 Steel
in the second file, but I don't want the "Metal" in the first line to be replaced.
I tried doing it with the the following code via Terminal, but it replaces all occurences of "Metal" in the files:
maccmd /replace "Metal" "Steel"
How can I replace only the "Metal" in the line that starts with "Number" without replacing any other occurence of "Metal" in the file?
I don't know anything about the maccmd program. So I am fine with a simple windows batch program.