I incorrectly declared a variable, and now it has two forward slashes in it. How do I unset/correct it?
In this particular example, do nothing: the double slash is exactly equivalent to a single slash.
If you really want to remove double slashes:
Removing the first entry:
There are ways to get the value of a variable into the command line editor:
There is a similar post on stackoverflow: What is the most elegant way to remove a path from the $PATH variable in Bash?. Just have a look.
You will want to include the $PATH
if you're using bash you usually want to set something like the line below in your .bashrc file:
in my case I tend to have some scripts in my $HOME/bin so I would do:
then make sure to source the file to apply the changes to your current shell.