Use Unix terminal instead of the Monitor on Arduino IDE
You'll need to condition the serial line with the stty command to get this to work. One of the easier ways to do it is to start by using the Serial Monitor and running the command:

stty -g &lt; /dev/tty.usbmodem1d112

That will show you all of the settings that the Serial Monitor used to conditions the line. The -g flag to stty tells it to give you the results in a form that can be used as the arguments to another stty command. You could do this like this:

echo -n 'stty ' &gt; stty.arduino ; sudo stty -g -f /dev/tty.usbmodem1d112 &gt;&gt; stty.arduino

chmod +x stty.arduino

The first line creates a shell script to condition the serial line. The second line makes it executable so that you can run it as a shell command – ./stty.arduino. The sudo runs the command as root (with elevated privilege) which allows you to open the port even though the Serial Monitor will already have it open.

If you want you could move the command into a directory on your $PATH (for example ~/bin) so that it can be found regardless of where your current directory is.

After getting set up you can see the output from Serial.println() on the Arduino by doing:

./stty.arduino

cat &lt; /dev/tty.usbmodem1d112

Depending on what you are trying to do, you might find the expect or script commands helpful. Expect (man page) lets you automate interactions with a text based application or process. Script (man page) creates a transcript of your interactions on the command line with another program or process.