MacOS' Terminal's marks are an incredible feature. They allow you to add a "marker" to a line, which can be jumped between. Documentation about these commands is available in Apple's own documentation, as well as previous questions here;

I often have a need to run a command repeatedly, which I tend to do via a shell script that puts a command in a while loop with a sleep timer, or an execution counter with a limit. Paging through executions is difficult unless I remember to also add some kind of marker like echo "---------" in the command chain.

Is it possible to add marks via shell scripting? My searches so far only show the menu option and keyboard shortcut.

  • The only solutions I've found using AppleScript (more specifically, osascript) in the terminal require telling Terminal to activate which brings it to the foreground, bad for (1) multiple tabs and (2) leaving in the background for a non-specific amount of time. Jul 12 '19 at 22:14

You must log in to answer this question.

Browse other questions tagged .