I want to let xdotool
type the current date automatically and wrote this bash script as a first try:
#!/bin/bash
STR="Hello World!"
xdotool type $STR
Unfortunately, it already fails at this point. It just types ... something ... Something like "<[<[<" or "H[ll==]l{₁". Why is this? How do I make it type a string or the current date (format: YYYY-MM-DD
, so today is 2016-01-06
)?
I used
STR="Hello World!" && xdotool type $STR
which seemed to work. Not sure why yours didn't work. if you want to debug bash scripts you can use the shell built-inset -xv
to get verbose details.