Enable debug mode on endpoint using console

How to enable debug log in endpoint using console ?
We have a fixlet called “GTS:Log Retrieval:HCLauncher Debug Enable” which will enable debug,
Apart from that we have one more debug to be enable on endpoint from collectors.

( for ex: this is the file path: /var/opt/BESClient/__GTS/__IEMHC/S001-C-Gv4.0-WEBLOGIC-UNIX/unix-weblogic-csd/scripts/weblogicV1/config/Log4j.properties
In this file we need to enable the debug line i.e., need to remove # from line log4j.rootLogger=DEBUG,A2,STDOUT1" )

I’m looking for a relevance/action script which can remove the # from the line log4j.rootLogger=DEBUG,A2,STDOUT1 and save the file. from the mentioned path…

Need help on this.