A single command to compile and run Rust programs
TL;DR
Compile and run rust programs with one simple bash script, i.e.
rust program.rs
.
TL;DR
Compile and run rust programs with one simple bash script, i.e.
rust program.rs
.
You may have come across the following message when doing some operation that uses your private key, such as working with git or ssh:
Bash, as a scripting language, can be a bit painful sometimes. It doesn't have good distinction between variable types, it has strange syntax for functions and the syntax for statements (such as if/while/case) is unintuitive and inconsistent. Having said that, you can rely on shell script being available on any Unix machine, and bash is almost as prevalent. Therefore, it's often the best choice for scripting.
I sometimes find myself in the situation where I have a command running in my terminal, and want to run another command only after the first has finished. I'm pretty forgetful, so I don't want to come back later and start the new command.
Getting the PID of a running command is something I do daily, particularly by grepping on the name, e.g.: