How do I remove the string "\n" (not the newline character) from the end of only lines that begin with the string "///"? Thanks.
Example Input:
Some text\n /// Some comment\n Desired Output:
Some text\n /// Some comment I've tried to use
sed -i 's/\\n*$//' $1 But, it removes all of the trailing "\n" strings.