linux make shell command
xxxxxxxxxx
: '1. Create a folder 'directory' to manage your own shell commands and
make a directory called 'bin' inside of it. Update your path variable to
include this bin directory'
$ ~/directory/bin export PATH=$PATH":$HOME/directoryadress/bin"
: '2. So you can do this permanently you will have to copy the command
on either the .profile (for all users) or .bashrc . Simply go to the end and copy
paste'
#in .profile
//
//text
#include directory to PATH permanenttly
export PATH=$PATH":$HOME/directoryadress/bin"
: '3. Create a script, say 'mybash' using your fav text editor and
write the command that you want your computer to run'
$ vim mybash
#inside of mybash
#!/bin/bash
command. Example: echo my new programm
: '4. Give execution permissions'
$ chmod +x mybash
: '5. Reload the .profile'
$ . ~/.profile
: '6. From any directory simply type'
$ mybash
my new programm