check os shell liunx cygwin darwin
Shell
#!/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:
- Title
- bash move
- Category
- Shell
- Title
- install ext-soap
- Category
- Shell
- Title
- git show staged files
- Category
- Shell
- Title
- how to pip install in folder
- Category
- Shell
- Title
- git fetch tags force
- Category
- Shell
- Title
- pycharm duplicate line
- Category
- Shell
- Title
- git find out commit for tag
- Category
- Shell
- Title
- git how to add remote
- Category
- Shell
- Title
- linux remove root access
- Category
- Shell
- Title
- Could not install Visual Studio Build Tools.
- Category
- Shell
- Title
- read string by string in file in linux
- Category
- Shell
- Title
- install node 12 linux terminal w10
- Category
- Shell
- Title
- install imblearn
- Category
- Shell
- Title
- search for files in linux terminal
- Category
- Shell
- Title
- get local node version
- Category
- Shell
- Title
- git add all files command
- Category
- Shell
- Title
- linux zip a directory
- Category
- Shell
- Title
- how to upload on github with command
- Category
- Shell
- Title
- git fklow init
- Category
- Shell
- Title
- unarchive tar acrhive
- Category
- Shell
- Title
- how ot get android notifications i ubuntu
- Category
- Shell
- Title
- ubuntu create a ssh key
- Category
- Shell
- Title
- how to undo makemigrations django
- Category
- Shell
- Title
- github undo last pushed commit
- Category
- Shell
- Title
- how to get the size of directory in linux
- Category
- Shell
- Title
- cmd delete folder
- Category
- Shell
- Title
- how to add extension to all files terminal
- Category
- Shell
- Title
- hide ls: cannot read symbolic link Permission denied
- Category
- Shell
- Title
- bash for loop
- Category
- Shell
- Title
- linux df -h levels occupy
- Category
- Shell
- Title
- grep cheat sheet
- Category
- Shell
- Title
- ubuntu install opencl
- Category
- Shell
- Title
- kubernetes service external ip pending
- Category
- Shell
- Title
- add alias fish shell
- Category
- Shell
- Title
- netstat check port
- Category
- Shell
- Title
- git global ignore
- Category
- Shell
- Title
- install jupyter notebook
- Category
- Shell
- Title
- how to grep if the first letter is a character not a number
- Category
- Shell
- Title
- how to install path adb
- Category
- Shell
- Title
- ssh ubuntu
- Category
- Shell
- Title
- npx create-react-app not working
- Category
- Shell
- Title
- git second commit
- Category
- Shell
- Title
- wheres i3 config file
- Category
- Shell
- Title
- bash get first argument
- Category
- Shell
- Title
- git ignore still tracking
- Category
- Shell
- Title
- github check local branches
- Category
- Shell
- Title
- linux find file containing text
- Category
- Shell
- Title
- linux check disk space
- Category
- Shell
- Title
- Why are there two ways to unstage a file in Git?
- Category
- Shell
- Title
- install itertools
- Category
- Shell
- Title
- install vuex
- Category
- Shell
- Title
- codepush get keys
- Category
- Shell
- Title
- how to install react spring
- Category
- Shell
- Title
- docker to sudoers
- Category
- Shell
- Title
- visual studio code ubuntu
- Category
- Shell
- Title
- get serial number for server using powreshell
- Category
- Shell
- Title
- vieuw the MOTD linux
- Category
- Shell
- Title
- how to install wordpress ubuntu 16.04 rosehosting
- Category
- Shell
- Title
- flasky fake
- Category
- Shell
- Title
- shutdown timer windows 10
- Category
- Shell
- Title
- how to install pyqt5 dev tools
- Category
- Shell
- Title
- how to delete services in kubernetes
- Category
- Shell
- Title
- close all localhost connections
- Category
- Shell
- Title
- centos 7 install iptables
- Category
- Shell
- Title
- particular screenshot in ubuntu
- Category
- Shell
- Title
- rename remote branch in git
- Category
- Shell
- Title
- ubuntu gpg 2
- Category
- Shell
- Title
- unzip a tar.gz file in linux
- Category
- Shell
- Title
- how to revert commit in git
- Category
- Shell
- Title
- pip install upgrade all
- Category
- Shell
- Title
- how to fix the traceback error debian linux
- Category
- Shell
- Title
- npm run custom script
- Category
- Shell
- Title
- linux rsync example
- Category
- Shell
- Title
- git init at wrong folder
- Category
- Shell
- Title
- bash special dollar sign shell varaibles
- Category
- Shell
- Title
- cosmicjs
- Category
- Shell
- Title
- julia install linux
- Category
- Shell
- Title
- git switch branch
- Category
- Shell
- Title
- git return from detached head
- Category
- Shell
- Title
- linux find files without string
- Category
- Shell
- Title
- bash list not
- Category
- Shell
- Title
- how to check if ip is up bash script
- Category
- Shell
- Title
- mv folder linux
- Category
- Shell
- Title
- grep remove duplicates
- Category
- Shell
- Title
- git rename branch
- Category
- Shell
- Title
- desktop trigger click bash shell ubuntu
- Category
- Shell
- Title
- how to zip with tar command
- Category
- Shell
- Title
- git proxy
- Category
- Shell
- Title
- gpg: can't connect to the agent: IPC connect call failed
- Category
- Shell
- Title
- install jquery npm
- Category
- Shell
- Title
- ERR_NO_CERTIFICATES: Encountered adb error: NoCertificates. ionic
- Category
- Shell
- Title
- linux get full path
- Category
- Shell
- Title
- youtube api python
- Category
- Shell
- Title
- hasura squashmigrations
- Category
- Shell
- Title
- run msi on linux
- Category
- Shell
- Title
- install windows service
- Category
- Shell
- Title
- how to create a new group in linux
- Category
- Shell
- Title
- get git username and email
- Category
- Shell
- Title
- git abort stash pop
- Category
- Shell
- Title
- command not found: nvm
- Category
- Shell