public void someMethod(int x) {
System.out.println("xx"); // Sed command should add this line to the java file for every method in the file
I tried using the following sed command to look for public as the starting pattern and the ending pattern of right paren, space, left bracket.sed '/public/,/) {/a System.out.println("xx);' file.java
but this doesn't work. It prints the logging statement mutliple times after below the public method call.Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.