User Tools

Site Tools


bash:aliases:os_specific_aliases

BASH - Aliases - OS specific aliases

# Get os name via uname.
_myos="$(uname)"
 
# Add alias using the OS.
case $_myos in
  Linux) alias foo='/path/to/linux/bin/foo';;
  FreeBSD|OpenBSD) alias foo='/path/to/bsd/bin/foo' ;;
  SunOS) alias foo='/path/to/sunos/bin/foo' ;;
  *) ;;
esac
bash/aliases/os_specific_aliases.txt · Last modified: 2020/07/15 09:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki