Skip to content

Instantly share code, notes, and snippets.

@gatesphere
Last active October 12, 2015 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gatesphere/4061547 to your computer and use it in GitHub Desktop.
Save gatesphere/4061547 to your computer and use it in GitHub Desktop.
Stupid Bash Tricks
a="hello"
b="world"
c=$a" there, isn't it a wonderful "$b"?"
echo $c
function hello-world {
local __resultvar=$1
local __blah="Hello, world!"
eval $__resultvar="'$__blah'"
}
hello-world foo
echo $foo
for i in {1..100}; do
echo -ne "\r$i"
sleep .5
done
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment