6 votes

What is '<<EOS' in shell commands like 'osascript <<EOS'

It is a here document (heredoc), and is built-in to several shells such as bash and zsh. The text between the delimiting identifiers (EOS in this case) is redirected to the command.
user avatar
  • 1,084
4 votes

AppleScript for zipping folders does unexpected things

The reason for the error is that zip tries to compress files by storing their filenames only, as specified by the -j option (from man zip): Store just the name of a saved file (junk the path), and do ...
user avatar
  • 13.5k
2 votes

How to run "node index" from a folder in terminal

You may have the cart before the horse here (or even two carts if you really want launchd or cron to schedule your process to run). I would save your command to a script file and test it with your ...
user avatar
  • 217k
2 votes
Accepted

Cron job is python script not executing automatically altough cron and Terminal was added to full disk access

I logged my output of the cron job as following: * * * * * python /Users/maxhager/test/some.py > /Users/maxhager/test/backup.log 2>&1 > /Users/maxhager/test/backup.log 2>&1 is ...
user avatar
1 vote

Is it possible to change display resolution with a keyboard shortcut?

This worked for me on Monterey 12.3.1 to change resolution on my 2nd monitor from the list. I will transfer this script to automator to change resolution with keyboard set res to 3 set monitor to 2 ...
user avatar
1 vote

How do I add leading zeroes to a batch rename Applescript?

One solution would be to add the number to a string of zeros and get the desired number of digits from the end. Using your script (you might want to add some error handling for duplicates, etc), it ...
user avatar
  • 1,084
1 vote
Accepted

script menu keeps disappearing from menu bar

I know this following AppleScript code works on macOS Monterey. Save this following AppleScript code as an .app or create an Automator Quick Action. It will automatically put the Script Menu back in ...
user avatar
  • 6,289
1 vote
Accepted

What is '<<EOS' in shell commands like 'osascript <<EOS'

(Thanks to @red_menace, @fdo, and @nohillside so far. I've upvoted @red_menace's. It's "correct", but I found it difficult to grasp. I didn't really get it, until I read @fdo's link (first ...
user avatar
  • 378

Only top scored, non community-wiki answers of a minimum length are eligible