I want to create a custom command on linux (ubantu) which I need to execute regularly.
steps are:
- create a shell-script
- place the shell script in /usr/bin/ dir
- name of shell-script file is custom command
e.g
I want kill node processes running by just typing “killnode”
#!/bin/bash #fileName /usr/bin/killnode #echo "the folder is `pwd`" #echo "The folder which contains files are `ls`" nodeKaPids=`pidof node` echo "Pids of node are: ${nodeKaPids}" `kill -9 ${nodeKaPids}` echo 'nodes are killed'