Forwarded from Geeky Career (Mohammad Moallemi)
#linux #terminal #bash
How to get process PIDs?
The
https://linuxize.com/post/pgrep-command-in-linux/
How to get process PIDs?
pgrep <process_name>
e.g.pgrep python
pgrep
is a command-line utility that allows you to find the process IDs of a running program based on given criteria. It can be a full or partial process name, a user running the process, or other attributes.The
pgrep
command is a part of the procps
(or procps-ng
) package, which is pre-installed on nearly all Linux distributions.https://linuxize.com/post/pgrep-command-in-linux/
Forwarded from Geeky Career (Mohammad Moallemi)
#bash #linux
How can I check if a program exists from a Bash script?
@Geeky_Career
How can I check if a program exists from a Bash script?
command -v <the_command>
https://stackoverflow.com/questions/592620/how-can-i-check-if-a-program-exists-from-a-bash-script@Geeky_Career
Stack Overflow
How can I check if a program exists from a Bash script?
How would I validate that a program exists, in a way that will either return an error and exit, or continue with the script?
It seems like it should be easy, but it's been stumping me.
It seems like it should be easy, but it's been stumping me.
Forwarded from Geeky Career (Mohammad Moallemi)
#bash #linux #scripting
How To Exit When Errors Occur In Bash Scripts
https://intoli.com/blog/exit-on-errors-in-bash-scripts/
@Geeky_Career
How To Exit When Errors Occur In Bash Scripts
https://intoli.com/blog/exit-on-errors-in-bash-scripts/
@Geeky_Career
Forwarded from Programming Resources via @like
Test your shell knowledge with this awesome challenge.
مهارتهای shell خود را با این بازی آنلاین محک بزنید.
#shell #bash #command #line #challenge #practice #terminal #linux #game #gamification #fun
@pythony
cmdchallenge.com
مهارتهای shell خود را با این بازی آنلاین محک بزنید.
#shell #bash #command #line #challenge #practice #terminal #linux #game #gamification #fun
@pythony
cmdchallenge.com