{"id":21475992,"url":"https://github.com/smf8/shell-script-learnings","last_synced_at":"2026-04-18T01:03:47.787Z","repository":{"id":131381809,"uuid":"217507615","full_name":"smf8/shell-script-learnings","owner":"smf8","description":"Exercises on the path of learning shell scripting ","archived":false,"fork":false,"pushed_at":"2019-11-28T12:55:55.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T08:49:22.830Z","etag":null,"topics":["bash","bash-script","linux","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smf8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-10-25T10:12:56.000Z","updated_at":"2022-10-07T13:26:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"876e0ae9-47a8-4292-bd84-b7a2fda52a11","html_url":"https://github.com/smf8/shell-script-learnings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/smf8/shell-script-learnings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smf8%2Fshell-script-learnings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smf8%2Fshell-script-learnings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smf8%2Fshell-script-learnings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smf8%2Fshell-script-learnings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smf8","download_url":"https://codeload.github.com/smf8/shell-script-learnings/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smf8%2Fshell-script-learnings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31952208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","bash-script","linux","shell-script"],"created_at":"2024-11-23T10:46:40.902Z","updated_at":"2026-04-18T01:03:47.729Z","avatar_url":"https://github.com/smf8.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shell-script-learnings\n\nJust the things used for practicing shell scripting\n\n- #### add-local-user\n\n  This script reads \"Username\" \"Password\" and \"Real name\" from standard input and creates a local user with it.\n\n  commands used in this script are as listed: \n\n  - `read` to read from stdin\n  - `if else` for condition checking\n  - `passwd \u0026\u0026 chpasswd` for changing and setting the user password\n  - `useradd` for adding use\n\n- #### lftp \u0026 mountftp\n\n  These scripts are my solutions for keeping a folder synced with another folder inside an ftp server. **`lftp.sh`** uses lftp command and must be used inside a crontab. **mountftp** uses curlftpfs to mount a folder in users Desktop\n\n  commands used in this script are as listed\n\n  - `read` to read from stdin\n  - `id` command to retrieve user's id and gid\n  - saving output of a command in a variable\n  - `chown`\n  - Detecting the path of the script\n  - Checking for file existence \n  - `read` from a file and save it to an array\n  - saving a text inside a file with output redirection\n  - redirecting stderr\n\n- **add-user-auto-password**\n\n  This script is the 2nd version of user creation scripts. In this script, we get username and comments as command line arguments and provide user with a default generated random password.\n\n  commands used in this script are as listed:\n\n  - `${@}, ${#}, ${NUM}` variables where used for working with positional parameters\n  - `date` command for a part of the password\n  - `${RANDOM}` for making the password psudo-random\n  - `md5sum` for generating a hashed string","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmf8%2Fshell-script-learnings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmf8%2Fshell-script-learnings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmf8%2Fshell-script-learnings/lists"}