
Shell Scripting
How to Use date on Both macOS and Linux Scripts Step by Step
The date command differs between macOS and Linux: -d versus -v, formatting flags, epoch conversion, and portable patterns for scripts that run on both.
6 min read
Tag
3 posts

The date command differs between macOS and Linux: -d versus -v, formatting flags, epoch conversion, and portable patterns for scripts that run on both.

Edit files in place with sed on both macOS and Linux: why -i behaves differently, the portable backup-suffix form, and when to reach for perl or ed instead.

Schedule scripts on macOS with launchd: a plist with StartCalendarInterval, load it with launchctl, logs, differences from cron and common mistakes.