You will need
- A Macintosh computer
- A USB-to-serial adapter
- A file with a config you want to paste sloooowly
- A few minutes
Paste the following into a terminal - WARNING! Overwrites your .screenrc
cat <<EOF >> ~/.screenrc
startup_message off
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W}%c %{g}]'
defslowpaste 20 ## It is the value to the left that is the central one for your happiness
EOF
Add this:
slowpaste 20 ## It is the value to the left that is the central one for your happiness
Your USB adapter ought to register as /dev/tty.SOMETHING
, where SOMETHING is usually something with usb
. You can try to find it by typing ls /dev/tty.*
. In below example, I am using tty.usbserial-A504CTHN
.
$ screen tty.usbserial-A504CTHN 9600
Appending 9600
signals to screen to use 9600 baud.
Type Ctrl-A
, then type :readreg p <file name>
to save the contents of <file name>
in a paste buffer named p
. Any letter can be used, so you can have multiple paste buffers; e.g. d
for default boilerplate, q
for QoS, m
for multicast, etc.
The easiest way to ensure the correct file name in your terminal is simply to type Ctrl-A
, :readreg p
(including a trailing space), then dragging the file from the Finder to the terminal window.
Go where you want to paste (e.g. conf t
mode), type Ctrl-A
, then type :paste p
. Magic ensues.