For the below xml ,I need to replace
for
to
xlmlint
, as the name implies, is for parsing and validating XML, not editing it. If you can install xmlstarlet
on your cluster, you can do the following:
xmlstarlet ed --update "/studentFile/student[studentName='CLASSA']/studentActions/studentAction[studentType='Juniour']/studentStatus" --value "Failed" *file*