Please try the following commands:
echo "(After Sweet Memories) Play Born To Lose Again" | tr '(' '-' | tr ')' '-' | tr ' ' '-'
-After-Sweet-Memories--Play-Born-To-Lose-Again
(notice the double --
)
I'm unable to modify the command and pass a (null) value instead i have to pass another -
see this example and this error:
echo "(After Sweet Memories) Play Born To Lose Again" | tr '(' '' | tr ')' '' | tr ' ' '-'
tr: tr: when not truncating set1, string2 must be non-emptywhen not truncating set1, string2 must be non-empty
tr -d '()'
– Anna