I want to replace spaces from data which are written in brackets using shell script.
my input line is
2012-05-21 06:37:16 M NumberOfHwEntitiesMismatch Cabinet=1
(SAU that is not configured detected.)
I want my output to be:
2012-05-21 06:37:16 M NumberOfHwEntitiesMismatch Cabinet=1
(SAU_that_is_not_configured_detected.)
Please suggest me something….
Using
awk, split on “(” and then usegsubto replace space with underscore in the second field.Example:
(This assumes that your input has only one set of brackets.)