I'm writing a shell script, and I need to know the architecture, i.e. PPC or Intel. Back in the day, there was a program /bin/arch
that told you, but my Mac doesn't seem to have it.
Is there an easy way I can do this? grep
for something in a log file? Call some other program that spits that out as a side effect?
It would be nice to know what OS version I'm running too, but that may not be necessary.
machine
did the job to me; see also What does i386 mean on macOS Mojave?