Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created September 16, 2010 22:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/583249 to your computer and use it in GitHub Desktop.
Save isaacs/583249 to your computer and use it in GitHub Desktop.
# Create a more gnuish userspace
cmds="ar as awk basename cat chgrp chmod chown chroot cksum cmp comm
cp csplit cut date dd df diff diff3 diffmk dirname du echo
egrep env eqn expand expr factor false fgrep find fmt fold gprof
grep groups head hostid id indxbib install join kadmin kill ld link
ln logname lookbib ls make mkdir mkfifo mknod mktemp mv neqn nice nl
nm nohup nroff od paste patch pathchk pr printf prof pwd ranlib
refer rm rmdir sdiff sed size sleep soelim sort split strings strip
stty sum sync tail tar tbl tee test touch tr troff true tsort tty
uname unexpand uniq unlink unzip uptime wc who xargs yes zcat"
for i in $cmds
do
if which $i 2>/dev/null 1>/dev/null && \
which g$i 2>/dev/null 1>/dev/null
then
src=$(which g$i)
dest=/home/node/local/bin/$i
[ -f $dest ] && grm $dest
gln -s $src $dest
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment