Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

if else in mac terminal

#!/bin/bash

defaultsReturn=$(defaults read com.apple.finder AppleShowAllFiles)

if [ '1' = "$defaultsReturn" ]; then
    echo "AppleShowAllFiles is enabled"
elif [ '0' = "$defaultsReturn" ]; then
    echo "AppleShowAllFiles is not enabled"
else
    echo "defaults returned some other value: $defaultsReturn"
fi
Comment

PREVIOUS NEXT
Code Example
Shell :: Update VS code from snap store 
Shell :: how to pull from a particular branch in git 
Shell :: install samba on raspberry pi 
Shell :: django load data 
Shell :: vuetify install 
Shell :: install virtualbox ubuntu 20 wsl command line 
Shell :: arch add fonts 
Shell :: pip install update 
Shell :: * branch master - FETCH_HEAD 
Shell :: linuxbrew 
Shell :: read line by using linnumber shell 
Shell :: look word in files command 
Shell :: add pg_config to path 
Shell :: venv activate 
Shell :: wait command bash 
Shell :: ubuntu show line in file containing text 
Shell :: install docker-compose ec2 
Shell :: ubuntu darling 
Shell :: Error: .ini file does not include supervisorctl section 
Shell :: cli check what is listening on port 
Shell :: install code . path in mac 
Shell :: s3cmd install 
Shell :: git apply previous stash 
Shell :: bash print specific range of rows from a file 
Shell :: speedtest linux cli 
Shell :: progress bar file.tar.xz extract 
Shell :: linux print screen 
Shell :: How to push code to your github repository using token authentication 
Shell :: httpd.conf location centos 
Shell :: sh declare variable 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =