I have a file called .bash_aliases
where I keep my aliases. While I have just one alias in the file it works properly, however when I try to create a new one the terminal fails to recognize the command line. Is the reason for this is a conflict between apostrophes '
and quotation marks "
?
The alias:
alias vid-dl="youtube-dl -o 'Videos/randon/%(title)s.%(ext)s'"
Error:
vid-dl: command not found
I used the aliases as follows in the terminal:
vid-dl URL
In .bash_aliases
, is it necessary to use something to indicate that the line is finished? In other programming languages, like JavaScript and C#, lines are terminated by a semicolon (;
).
When I tested the command line youtube-dl -o 'Videos/randon/%(title)s.%(ext)s
without the alias it worked perfectly.
alias vid-dl='youtube-dl -o '\''Videos/randon/%(title)s.%(ext)s'\'''
.