w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Should this be done with bash script or automator or applescript?

The last line in your script sudo reboot now would make any sort of loop meaningless.

However, if you insist, use may a loop:

#!/bin/bash
fpath=$(dirname "$0")

for i in {2000119..3000119}; do
  ee_image=mlr-${i}.bin
  sudo nvram tbt-options=4
  sudo /usr/sbin/bless -mount / -firmware "$fpath/ThorUtilDevice.efi"
-payload "$fpath/$ee_image" -options "-o -ej 1 -blast
efi-apple-payload0-data" 
  sudo reboot now
done

This would loop through mlr-2000119.bin to mlr-3000119. You can also consider passing an argument to the script in which case you can use your original script with the ee_image line as

  ee_image=mlr-$1.bin

and invoke bash /path/to/your/script.sh 2000119





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.