guide/crime5/typewrite.sh aktualisiert
This commit is contained in:
@@ -3,12 +3,13 @@
|
|||||||
type_text() {
|
type_text() {
|
||||||
local text="$1"
|
local text="$1"
|
||||||
local delay="$2"
|
local delay="$2"
|
||||||
local i
|
local i char
|
||||||
|
|
||||||
for ((i=0; i<${#text}; i++)); do
|
while IFS= read -r -n1 char; do
|
||||||
printf "%c" "${text:$i:1}"
|
printf "%b" "$char"
|
||||||
sleep "$delay"
|
sleep "$delay"
|
||||||
done
|
done <<< "$text"
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user