{"id":18635980,"url":"https://github.com/krushna-prasad-sahoo/shell-script-practice","last_synced_at":"2025-04-11T08:30:59.395Z","repository":{"id":118369934,"uuid":"470708080","full_name":"Krushna-Prasad-Sahoo/Shell-Script-Practice","owner":"Krushna-Prasad-Sahoo","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-01T11:59:09.000Z","size":91,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T11:49:16.389Z","etag":null,"topics":["bash","linux","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Krushna-Prasad-Sahoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-16T18:35:33.000Z","updated_at":"2024-05-01T11:59:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"72bd7af1-f7ca-4b74-aba3-5b7447507461","html_url":"https://github.com/Krushna-Prasad-Sahoo/Shell-Script-Practice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krushna-Prasad-Sahoo%2FShell-Script-Practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krushna-Prasad-Sahoo%2FShell-Script-Practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krushna-Prasad-Sahoo%2FShell-Script-Practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krushna-Prasad-Sahoo%2FShell-Script-Practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Krushna-Prasad-Sahoo","download_url":"https://codeload.github.com/Krushna-Prasad-Sahoo/Shell-Script-Practice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248361496,"owners_count":21090908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","linux","shell"],"created_at":"2024-11-07T05:27:30.472Z","updated_at":"2025-04-11T08:30:59.030Z","avatar_url":"https://github.com/Krushna-Prasad-Sahoo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Know Your Environment\n\nKernel ?\n- An intermediate program\n- Interface between hardware \u0026 software\n\nShell? \n- An interface between users \u0026 Kernel/OS\n- `cat /etc/shells` : check which all shell programs are available in your OS\n- `echo $0` : check your current shell \n- `cat /etc/passwd` : check which user is associated with which shell\n\nShell Types ?\n- Graphical Shells \n    - Gnome\n    - KDE\n- CLI Shells\n    - sh (bourne shell)\n    - bash (bourne again shell) \n    - csh \u0026 tcsh\n    - ksh (korn shell - solaris)\n\nShell Scripting ?\n- Put all instructions in a specific file \u0026 RUN it on Shell\n- Give file extension as `.sh` (not mandatory)\n\nRun a Shell Script ?\n- Absolute path (example - `/home/student/scripts/testing.sh`)\n- Reletive path (example - `./testing.sh`, when you are already present at `/home/student/scripts/` directory)\n\n### Scripting Best Practices\n- Script File Convention :\n\t- make a work directory \u0026 keep scripts in it.\n\t- script name should identify function/operation\n\t- extension can be given as .bash/.csh/.ksh if working in multiple shells.\n- Script File Permission :\n\t- chmod a+x name (make executable)\n- Shell Script Format : \n\t- Define Shell (#!/bin/bash)\n\t- Comments (# comments)\n\t- Define Variables\n\t- Commands\n\t- Statements (include indentation)\n- Script is executed from top to bottom in sequence.\n- Add Exit/Status Code in your code :\n\t- If code is `0` : Code executed successfully\n\t- Else if code is `1-255` : Code execution was not successful.\n\n\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Krushna-Prasad-Sahoo/Shell-Script-Practice?style=for-the-badge)\n![GitHub last commit](https://img.shields.io/github/last-commit/Krushna-Prasad-Sahoo/Shell-Script-Practice?style=for-the-badge)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrushna-prasad-sahoo%2Fshell-script-practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrushna-prasad-sahoo%2Fshell-script-practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrushna-prasad-sahoo%2Fshell-script-practice/lists"}