24 Oct
2002
24 Oct
'02
04:39
On Thu, 24 Oct 2002, Ronald Wiplinger wrote:
Hi,
I need a one liner program or similar short:
I need to test a text file for a certain line and if this one is not exactly the match I have, than it should replace the line with the given one. If it is missing, than this line must be added.
Can anybody help me to do that?
With the info you gave, I can only say that sed or awk will likely do what you want. If you want us to give a more precise example of the command line, you must be more specific in telling what you want. Give examples of possible files, and what lines should be replaced and how. Regards Ole