Separate slow terminal as note.

This commit is contained in:
2026-05-08 14:00:49 +02:00
parent 23ff184688
commit c3293ec3ac
3 changed files with 48 additions and 11 deletions
+6
View File
@@ -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/
+40
View File
@@ -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
```