Skip to content

Instantly share code, notes, and snippets.

@DavidEGrayson
Created November 12, 2017 16:04
Show Gist options
  • Select an option

  • Save DavidEGrayson/5dc9a88ab5df0ca34d34c01d730480f5 to your computer and use it in GitHub Desktop.

Select an option

Save DavidEGrayson/5dc9a88ab5df0ca34d34c01d730480f5 to your computer and use it in GitHub Desktop.
$ cat test.sh
#!/bin/sh
for a in 0; do
echo b=$(echo "c-d" | tr - _)
done
$ . test.sh
b=c_d
$ sh test.sh
b=c_d
$ bash test.sh
b=c_d
$ ./test.sh
b=c_d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment