I am working with a script which automatically enrolls macOS devices (installs software, sets up system preferences etc.) using Jamf. While the script is running, I want a real-time log to appear on the desktop for the administrator to check progress etc.

Using the SE search I could only find logging to files after script was finished.

Q: how do I add real-time logging to a text-file on the desktop into my bash script?


Have you heard of tee which sends stdin to stdout and a logfile. Your command need only send to stdout which you can pipe into tee.

Not the answer you're looking for? Browse other questions tagged or ask your own question.