From c3293ec3aced080ffb44da4931a679f8b933f5cd Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Fri, 8 May 2026 14:00:49 +0200 Subject: [PATCH] Separate slow terminal as note. --- shell/joyous_ascii.md | 6 ++++++ shell/slow.md | 40 ++++++++++++++++++++++++++++++++++++++++ writing/ed.md | 13 ++----------- 3 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 shell/slow.md diff --git a/shell/joyous_ascii.md b/shell/joyous_ascii.md index 9b9dff7..9ddace0 100644 --- a/shell/joyous_ascii.md +++ b/shell/joyous_ascii.md @@ -25,3 +25,9 @@ until [ "$x" -eq "1" ]; do sleep 1 done ``` + +[Slow down the terminal][slow] then enjoy some [old ASCII art][ascii]. + +[slow]: shell/slow.md +[ascii]: http://artscene.textfiles.com/vt100/ + diff --git a/shell/slow.md b/shell/slow.md new file mode 100644 index 0000000..03e7929 --- /dev/null +++ b/shell/slow.md @@ -0,0 +1,40 @@ +--- +title: Slow the Terminal Down +tags: +- fun +--- + +Slow the terminal to the old rates with a pipe and perl: + +```sh +ff=/tmp/bashpipe +mkfifo $ff +( cat $ff | perl -We 'use Time::HiRes;$|++;while(read(STDIN,$c,1)){Time::HiRes::usleep(15000);print $c;}' ) & exec &> $ff + +``` + +- Try running `dir` and `dir -F`! +- Don't run interactive commands like `vim` or `top`! + +You can make it into a bash function by putting this into your `~/.bashrc`: + + +```bash +slow () +{ + unset VISUAL; + EDITOR=ed; + alias ls='dir -F'; + export PS1='[$?] \W $ '; + ff=/tmp/bashpipe_$(date +%s); + mkfifo $ff 2> /dev/null; + ( cat $ff | perl -We 'use Time::HiRes;$|++;while(read(STDIN,$c,1)){Time::HiRes::usleep(15000);print $c;}' ) & exec &> $ff; +} +``` + +Then type: + +```bash +exec bash +slow +``` diff --git a/writing/ed.md b/writing/ed.md index 4307ac9..b3f8b77 100644 --- a/writing/ed.md +++ b/writing/ed.md @@ -15,18 +15,9 @@ You would type a command to the computer, and it would type out any errors. It would not waste paper, ink, and time by typing out `COMMAND RUN SUCCESSFULLY` after each command. A silent machine meant a happy machine. -To fully appreciate `ed`, you can slow down your terminal with the following command: +To fully appreciate `ed`, you should [slow down your terminal]. -```sh -ff=/tmp/bashpipe -mkfifo $ff -( cat $ff | perl -We 'use Time::HiRes;$|++;while(read(STDIN,$c,1)){Time::HiRes::usleep(15000);print $c;}' ) & exec &> $ff - -``` - -Try running `dir` and `dir -F`! - -Okay, now onto `ed`... +[slow]: shell/slow.md # Basic Usage