Search Results

Search: Posts Made By: teefa14
2,861
Posted By nezabudka
sed 'N;N;/5/ s/yes/no/' file sed...
sed 'N;N;/5/ s/yes/no/' file
sed '/^<alarmsend/{N;N;\%5</type>$% s/yes/no/}' file

--- Post updated at 13:44 ---

If you complicate the task as much as possible
sed -r '/^<alarm/...
2,861
Posted By RudiC
First thing to do is: get rid of syntax errors...
First thing to do is: get rid of syntax errors in your code.


For your problem, try
tac file | awk '/<type>5/ {T5 = 1} /<alarmsend/ && T5 {sub (/yes/, "no"); T5 = 0} 1' | tac...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 07:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy