{"id":17972819,"url":"https://github.com/patrickshaw/linux-cli-example","last_synced_at":"2026-04-18T19:31:36.124Z","repository":{"id":85513045,"uuid":"89064532","full_name":"PatrickShaw/linux-cli-example","owner":"PatrickShaw","description":"A Linux command line interpreter written to mimic some of the basic commands used in Linux.","archived":false,"fork":false,"pushed_at":"2017-04-24T10:33:42.000Z","size":403,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-17T20:59:18.982Z","etag":null,"topics":["assignment","cli","linux","operating-systems","study","university"],"latest_commit_sha":null,"homepage":"","language":"C","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/PatrickShaw.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":"2017-04-22T11:22:00.000Z","updated_at":"2023-02-13T18:13:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"4cb208ee-c9b5-45f6-a9c6-bd73d3699e01","html_url":"https://github.com/PatrickShaw/linux-cli-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PatrickShaw/linux-cli-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickShaw%2Flinux-cli-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickShaw%2Flinux-cli-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickShaw%2Flinux-cli-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickShaw%2Flinux-cli-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatrickShaw","download_url":"https://codeload.github.com/PatrickShaw/linux-cli-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickShaw%2Flinux-cli-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31982491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"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":["assignment","cli","linux","operating-systems","study","university"],"created_at":"2024-10-29T16:25:58.134Z","updated_at":"2026-04-18T19:31:35.953Z","avatar_url":"https://github.com/PatrickShaw.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Command line interpreter\n## FTI2070 Operating Systems - Assignment 1\n### Running the basic interpreter\n1. Navigate to and open a terminal in the Basic/bin folder\n2. Enter `./bin/basic_cli`\n3. The basic CLI should now be running. You may now enter commands into the CLI or type help to display the user manual.\n\n### Running the advanced interpreter\n1. Navigate to and open a terminal in the Advanced/bin folder\n2. Type `./bin/advanced_cli`\n3. The advanced CLI should now be running. You may now enter commands into the CLI or type help to display the user manual.\n\n### Commands\n`clear`\nClears the output screen.\n`cd `**`\u003cdirectory\u003e`**\nChanges the default directory to **`\u003cdirectory\u003e`**.\nIf the argument is not present, the current directory is changed to the *HOME* environment.\n\n`dir `**`\u003cdirectory\u003e`**\nLists the contents of the given directory **`\u003cdirectory\u003e`**.\n\n`echo `**`\u003ccomment\u003e`**\nPrints the first **`\u003ccomment\u003e`**.\nA comment is a sequence of characters start with a double quote character.\nIt is terminated by the next double quote.\n\n`help`\nDisplays the user manual using the less command.\n\n`pause`\nPauses the execution of the CLI program until the Enter key is pressed.\n\n`quit`\nStops executing the CLI program and terminates.\n\n`new `**`\u003cfile\u003e`**\nCreate a new file with name **`\u003cfile\u003e`**.\n\n`cp `**`\u003cold\u003e \u003cnew\u003e`**\nCopy the contents of an existing file with name **`\u003cold\u003e`** to a new file with \n\n`name `**`\u003cnew\u003e`**\n\n`find `**`\u003cchar\u003e \u003cfile\u003e`**\nDisplays the number of occurrence of the character **`\u003cchar\u003e`** in an existing file with name **`\u003cfile\u003e`**.\n\n`run `**`\u003cprogram\u003e`**\nExecute any executable program with name **`\u003cprogram\u003e`**.\n\n`halt `**`\u003cprogram\u003e`**\nStop executing the program with name **`\u003cprogram\u003e`**.\n\n### Using command arguments that include spaces\nThe CLI seperates command arguments/parameters by spaces. However, command arguments can be combined by encapsulating them within double quotation marks.\n\n#### Example\nThe following command will not work:\n`cp ./original file with space ./new file with whitespace`\n\nThe following command will work:\n`cp \"./original file with whitespace\" \"./new file with whitespace\"`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickshaw%2Flinux-cli-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickshaw%2Flinux-cli-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickshaw%2Flinux-cli-example/lists"}