Looking for a very simple Bash script for automate

2019-09-21 15:53发布

I would like to write a very simple linux bash script that simulates the key-combination "ctrl+S" every 60 seconds and runs in the background.

Unfortunately I don't have any clue about Bash Scripts and couldn't find related topics. Could someone help me out?

Thanks!

标签: linux bash key
2条回答
我欲成王,谁敢阻挡
2楼-- · 2019-09-21 16:04

Use xdotool in a loop:

while sleep 60
do
  xdotool key ctrl+s
done
查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-09-21 16:08

The script is just supposed to regularly save a google docs spreadsheet in the browser.

This is unnecessary. Google Docs spreadsheets save themselves automatically anyway.

查看更多
登录 后发表回答