The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
replace nth value in xml file
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
replace nth value in xml file
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
5
(
permalink
)
06-18-2008
freelong
Registered User
Join Date: Apr 2008
Posts: 38
Code:
awk '/<type>.*<\/type>/{n+=1; if(n==2){gsub(/<type>.*<\/type>/,"OK",$0)}}1' application.xml
freelong
View Public Profile
Find all posts by freelong
Find freelong's past nominations received
Find freelong's present nominations given