I have a script that generate me some command that I must execute…
Example:
wolfy@wolfy-server:~$ ./myScript.sh
some linux command (Like: ls, cd. cp, ...)
wolfy@wolfy-server:~$
I would like that when I run myScript.sh it automaticaly type this command in my command line like:
wolfy@wolfy-server:~$ ./myScript.sh
wolfy@wolfy-server:~$ some linux command
so that I only need to check if is all ok with the command and press enter to run it… no copy needed 🙂
Can this be done?
Edit:
I edited my example, so that everyone can see that this script can’t be an alias, because this script return different commands each time. btw… the command is not my question, my question is how to put this “random” command in that place.
It is definitely not possible to do this with a script.
You could write that command into your script and wait for a keypress…