TyphoidHippo
1Trillion K Platinum User
I figure with all these members, there's gotta be at least one person who is good with bash scripting - whether or not I'll actually get their attention with this thread...I'm kinda doubtful - but it sure would be swell, since people here are generally much more friendly than the ones I could ask for help on *nix forums.
Basically, all I want to do is make a script that will read some variable definitions from one file and then go replace those variable instances in other files with said definitions from the first file.
Example:
***Definitions file***
definitions.src
%{APPNAME} SomeName
%{APPDESC} Some program that does something
%{AUTHOR} John Doe
%{DATE} 09-24-08
***File to be altered (before running the script)***
SomeName.cpp
//%{APPNAME}.cpp
//%{APPDESC}
//Created/revised by %{AUTHOR} on %{DATE}
***File to be altered (after running the script)***
SomeName.cpp
//SomeName.cpp
//Some program that does something
//Created/revised by John Doe on 09-24-08
Thanks in advance if anybody can help.
Basically, all I want to do is make a script that will read some variable definitions from one file and then go replace those variable instances in other files with said definitions from the first file.
Example:
***Definitions file***
definitions.src
%{APPNAME} SomeName
%{APPDESC} Some program that does something
%{AUTHOR} John Doe
%{DATE} 09-24-08
***File to be altered (before running the script)***
SomeName.cpp
//%{APPNAME}.cpp
//%{APPDESC}
//Created/revised by %{AUTHOR} on %{DATE}
***File to be altered (after running the script)***
SomeName.cpp
//SomeName.cpp
//Some program that does something
//Created/revised by John Doe on 09-24-08
Thanks in advance if anybody can help.