Add slowcat script

This commit is contained in:
feedc0de committed 2023-01-29 20:04:24 +01:00
1 parent 09ea1617ce
commit b7abb8b811
2 files changed
+19

No files matched your search

+11
View File
@@ -1,2 +1,13 @@
# slowcat
A very slow cat
## Examples
```
slowcat filename
( echo ab ; echo cd ; echo ef ; echo gh ) | slowcat
SLOWCAT_DELAY=.1 slowcat --help
timeout screen /dev/ttyUSB0 115200 ; SLOWCAT_DELAY=.05 slowcat filename > /dev/ttyUSB0
```
Executable
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
cat "$@" | while IFS= LANG=C read -r -n1 -d '' a
do
printf %c "$a"
# echo "$a"
sleep ${SLOWCAT_DELAY:-.001}
done