Is it possible to run bash builtin from non bash script?
- by tig
Is it possible to run for example history -w for underlying bash shell from ruby script?
Or better is it possible to run builtin command for bash shell knowing only its pid?
The only way I found is to trap signal like trap "history -w" SIGUSR1 and then send signal to process, but I am not sure that it is a good practice and USR1 is not used by bash, also this way I can execute max 2 commands (USR1 and USR2). And I have to define trap before using it.
I am on Mac so there is not SIGRTMIN..SIGRTMAX.