I understand that variables are global unless otherwise stated local, but for some reason, (and it's probably my own stupidity) it's not working. I have searched around to no avail.
#!/bin/bash
function a {
echo $1
}
echo $1
a
Say you pass the word car to it. It should display it twice. It doesn't. Only once.