Reputation: 267
I want to execute the below line:
sed -n '/description/!{H;d}; /description/ {x; /XCJDAST/p}; $ {x; /XCJDAST/p}' tsgroupsPrevious.xml
This is working fine for Unix but not working for solaris,giving command garbled error
Upvotes: 0
Views: 1385
Reputation: 10039
sed -n '#Solaris version
/description/!{
H;d
}
/description/ {
x; /XCJDAST/p
}
$ {
x; /XCJDAST/p
}' tsgroupsPrevious.xml
d
, sed stop the script even with a ;
after, not in linux;
is a substitute for line separator, not always available in non GNU sed script especially in group of action (and after command like d
)Upvotes: 1