Hello people,
I know very little about bash scripting, but reading a couple of online manuals and forums I managed to create a script that gets the title of a youtube video and creates an empty file with the same name:
Code:
#!/bin/bash
name=$(youtube-dl --get-title $1)
touch "$name"
exit 0
It works flawlessly but when there's a video whose title contains slashes / the file is not created. For example
http://www.youtube.com/watch?v=nBHo6O1vVlc
How can I remove all the slashes from a title and replace them with a vertical bar | ?
Thank you in advance