Atom's Echo Mac OS

Atom's Echo Mac OS

May 25 2021

Atom's Echo Mac OS

  1. Atom's Echo Mac Os Pro
  2. Atom's Echo Mac Os Catalina
Sample bash script to show how to parse the macOS version

Atom's Echo by the static man Atom's Echo was originally developed as a supplemental release to epilogue simulator, a project by the late JRPG Combat Systems. I was inspired by the Silent Hill games and an image of a forest laden with mist accompanied by the Robert Rich album, Echo of. However, not every computer will work with Mac OS X. Be sure to read the Hackintosh compatibility guide very carefully, to check whether or not your computer qualifies. Also, Mac OS X needs its own hard drive- a minimum of 10 GB of space is required, but at least 50 GB of space is recommended.

os_version.sh
#!/bin/bash
# use argument 1 as the version or get it from sw_vers
os_ver=${1-:$(sw_vers -productVersion)}
# string comparison
if [[ '$os_ver' 10.13.* ]];then
echo'macOS High Sierra'
elif [[ '$os_ver' 10.12.* ]];then
echo'macOS Sierra'
else
echo'(Mac) OS X something'
fi
# regular expression
if [[ '$os_ver'=~ 10.1[23].* ]];then
echo'It's one of the Sierras'
fi
# awk
echo'minor version with awk: '$(echo '$os_ver' awk -F. '{ print $2; }')
echo'patch version with awk: '$(echo '$os_ver' awk -F. '{ print $3; }')
# array
IFS='.'read -r -a ver <<<'$os_ver'
echo'minor version with array: ${ver[1]}'
echo'patch version with array: ${ver[2]}'
# numerical comparison
if [[ '${ver[1]}'-ge 9 ]];then
echo'somewhere in California'
elif [[ '${ver[1]}'-ge 2 ]];then
echo'officially a feline'
else
echo'secretly a feline'
fi
# get the build number:
build_ver=${2-:$(sw_vers -buildVersion)}
if [[ '${ver[1]}'-le 5 ]];then
build_number='${build_ver:3}'
else
build_number='${build_ver:4}'
fi
if [[ ${build_number: -1}'a' ]];then
build_number='${build_number:0:$((${#build_number}-1))}'
fi
echo'build number: $build_number'

commented Mar 5, 2018

Looking at this piece:

I needed to take into account the leading colon in os_ver. To do that I modified my if statement to this

Atom's Echo Mac Os Pro

commented Nov 6, 2019

I think it should have been:

(swap -: with :- to set the default)

Atom

Atom's Echo Mac Os Catalina

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Atom's Echo Mac OS