OneOfTheInfiniteMonkeys / sdinfo

A BASH script decoding Micro SD Card Information in PiOS BASH displaying SD Card manufacturer and age from the Micro SD CID.
MIT License
7 stars 0 forks source link

check for all external progs like xxd inc needed version #2

Open MaxPeal opened 2 years ago

MaxPeal commented 2 years ago

check for all external progs like xxd inc needed version.

e.g. on a system without xxd it don't catch the error: root@DietPi-01:~# bash sdinfo.sh -c 1b534d454332515430615763c7013633

   ___________________  
  |                   | 
  | |               ==| 
  | |               ==| 
  | |   SDInfo      ==| 
  | |   2021-12-24  ==| 
  | |               ==| 
  | |       __    ____| 
  |________/  |__/      

sdinfo.sh: line 416: xxd: command not found sdinfo.sh: line 422: xxd: command not found MID : Samsung OID : PNM : PRV : 30 PSN : 1633117127 MDT : 2019/6/1 AID : 956

root@DietPi-01:~#

OneOfTheInfiniteMonkeys commented 2 years ago

I agree, good suggestion.

It has been rather a long time since I wrote POSIX compliant scripts. Looking at the internet circa 1995, exciting! (Repeat comment)