I am novice to bash. I am setting up my gedit tool with a new bash command to comment and uncomment selected lines using the solution as given in this link Since my commenting style is '%' , so i have written like this compared to original solution given in that link.
comment="%"
xargs -i -d\\\n echo $comment{}
I have two questions:
when I do the commenting as shown above, the selected lines are commented, but the cursor enters to the next line from the last commented line. Thus leaving a blank space if there exist other statements after the last commented line. How to avoid it this cursor jumping to the next line.
The bash command to uncomment the commented lines given in that link removes the selected lines rather than removing the comments. how to fix it for my case ?
Thank you.