check os shell liunx cygwin darwin
#!/usr/bin/env bash
if [ "$(uname)" == "Darwin" ]; then
# Do something under Mac OS X platform
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
# Do something under GNU/Linux platform
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
# Do something under 32 bits Windows NT platform
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then
# Do something under 64 bits Windows NT platform
fi
Also in Shell:
- how to get stashed on git
- linux screen detach
- install react bootstrap
- how to stop a port in macos
- how to see all branches in git
- remove file from stage git
- env variable bash
- how to create a user and add it to a group in linux
- linux find files multiple
- linux mesuare request time http
- docker remove image
- how to delete all branches in git except master
- bash get value after equal sign
- git bash Could not open a connection to your authentication agent
- create cat document ubuntu
- count files in directory linux
- install expo
- how to remove commit in git extension
- pytesseract
- uninstall node from linux debian
- update all chocolatey packages
- bash get first argument
- sublime text linux
- Add line break to 'git commit -m' from the command line