Skip to content

Instantly share code, notes, and snippets.

@jinzhu
Created March 16, 2009 06:30
Show Gist options
  • Save jinzhu/79756 to your computer and use it in GitHub Desktop.
Save jinzhu/79756 to your computer and use it in GitHub Desktop.
find '/pillar/Lab/' -mindepth 1 -maxdepth 1 -type d |
while read file
do
eval "alias ${file##*/}='cd $file'"
done
if there is a directory named /pillar/Lab/hi
I want this script exec alias hi='cd /pillar/Lab/hi'
so I can use `hi` to jump to /pillar/Lab/hi
But it's doesn't work,what's wrong ?
thank you :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment