Skip to content

Instantly share code, notes, and snippets.

@Kambaa
Created March 22, 2024 20:29
Show Gist options
  • Save Kambaa/0298c3e2c48bd8da40534e0d4e73b4a1 to your computer and use it in GitHub Desktop.
Save Kambaa/0298c3e2c48bd8da40534e0d4e73b4a1 to your computer and use it in GitHub Desktop.
Linux auto enter text example
#!/bin/bash
string="EXAMPLE_TEXT..."
delay=0.05 # Delay between character inputs in seconds
sleep "0.5" # initial wait, without this, some of the chars in the beginning is missing
for char in ${string}; do
xdotool type "${char}" && sleep "${delay}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment