A repository for sample codes of shell-scripting.
- Knowledge of vi
- Linux OS
- Interest in coding
- Infinite amount of coffee (just kidding)
(1) In a terminal , type git clone git@github.com:athityakumar/shell-scripting.git
(2) Navigate to the scripts folder with cd shell-scripting/scripts
(3) Now , type chmod 755 file-name
(4) Then , type ./file-name
(5) Once the favourable output is achieved on running the above command , type sudo cp file-name ~/../../bin/
to add it as a command to be accessed from the terminal like file-name arg1 arg2 arg3
That's it! Happy shell-scripting!
To change the scripts , type vi file-name
in terminal.
To insert into file : Press Esc
, followed by i
and Tap Enter
To save the file : Press Esc
, followed by :
, followed by w
and Tap Enter
To quite the file : Press Esc
, followed by :
, followed by q
and Tap Enter
# | Script | Work done by the script |
---|---|---|
(1) | ak-add-command | Adds the shell-scripts as commands by adding them into the bin/ folder. Requires sudo authentification. |
(2) | ak-demo | A hello-world equivalent for shell-scripting. Prints details about the arguments used along with the command. |
(3) | ak-cd | A script that combines cd & ls commands. Should be run as ". ak-cd path" |
The work flow is the same as that of any other repository.
(1) Fork / clone the repository.
(2) Create a new branch , say my-changes
and make your changes in this branch.
(3) Commit your changes and send a Pull request (PR) to this repository.
Active contributors would be rewarded with the tag of "Collabrators"
Bug fixes , Issues , Issue solutions , Optimizations & Enhancements are always welcome.
The MIT License - Athitya Kumar - All Rights Reserved.