Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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
Comment

PREVIOUS NEXT
Code Example
Shell :: rearrange pdf pages linux 
Shell :: REMOTE HOST IDENTIFICATION HAS CHANGED! how to fix in ubuntu 
Shell :: cannot find mui lab module 
Shell :: how to autostart containers in ubuntu 
Shell :: linux remove single quotes from string 
Shell :: how to specify version in npm install 
Shell :: debian upgrade python 
Shell :: graphql install strapi 
Shell :: compress folder pigz 
Shell :: code in terminal 
Shell :: git merge master to branch 
Shell :: count lines in bash script 
Shell :: how to cat a file that has spaces 
Shell :: reinstall windows apps powershell 
Shell :: install python mac m1 
Shell :: Checking dependencies BASH 
Shell :: how to change port for xampp 
Shell :: how to install phpunit 
Shell :: how to set two wallpaper in ubuntu 
Shell :: linux stop running script 
Shell :: sudoers file location 
Shell :: which linux 
Shell :: install vagrant ubuntu 
Shell :: yarn upgrade 
Shell :: ps command 
Shell :: create default package.json 
Shell :: default .gitignore file 
Shell :: bash count files in directory recursively matchingattern 
Shell :: apt install yarn 
Shell :: run redis server 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =