I am writing a script to automate the preparation of a production environment. I need to open 4 terminal windows, arrange them and execute commands in each of them.
This works, but sometimes I disgustingly refuse - xdotool type randomly repeats some characters :
rvm use ruby-1.99999999999999999999999999999999.3-p194@ro && rails c ~/my_src/ruby_apps/ro > rvm use ruby-1.99999999999999999999999999999999.3-p194@ro && rails c ruby-1.99999999999999999999999999999999.3-p194 is not installed. To install do: 'rvm install ruby-1.99999999999999999999999999999999.3-p194' ~/my_src/ruby_apps/ro >
or in another window:
tail -fn 100 looooooog/thin.0.log ~/my_src/ruby_apps/ro > tail -fn 100 looooooog/thin.0.log tail: could not open ยซlooooooog/thin.0.logยป for reading: No such file or directory tail: no more files ~/my_src/ruby_apps/ro >
I think it depends on the processor load, because I have a really big .bashrc processed by ATOM and its load is high during script processing.
I use wait and sleep and the special order t2> invocations in the script to execute simple simple simple commands. This minimizes errors, but does not bother them at all.
What would you suggest to get a stable result regardless of CPU utilization (whatever)? It would be great to get rid of sleep .
UPDATE How to prevent xdotool characters from repeating?
source share