|
I Have a file by the name relog.001
I want to search for a line Local=IN
If found then skip
If not found then search for a line starting with 'Testion option Ok'
then insert the line 'Local=IN' after that.
File contents before inserting
gpg RC (54321)
Testion Option OK
AIX.SHA1.So
File contents after inserting
gpg RC (54321)
Testion Option OK
Local=IN
AIX.SHA1.So
Note :- I am passing the Rvalue 'IN' from subroutine, and it can change like (IN or US or
FR) so i need to evaluate it with a regular expression.
lvalue 'Local=Regularexpression'.
Hope it makes sense, quick reply will be appreciated.
|
|
|
|
|
|
|
|