I am storing a url inside a variable in bash. It has nothing to do with real file paths but it keeps giving me the error File name too long.
How do I tell bash to ignore looking for filenames and just store the long url string into the variable?
I am not using a file name. Can someone please explain and guide me on why I am getting that error that doesn't seem relevant?
#!/bin/bash video="" $video=$(youtube-dl -g -f bestvideo https://youtubeurl) echo $video
$ Bash script.sh
error: File name too long
Edit : Apologies,I used $( ) before the command. I typed it wrongly here on the stackexchange editor.Corrected it above.Tried using echo "$video" . I still get the same error. I am using ubuntu on Windows Subsystem for Linux