Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/patrickshaw/linux-cli-example
A Linux command line interpreter written to mimic some of the basic commands used in Linux.
https://github.com/patrickshaw/linux-cli-example
assignment cli linux operating-systems study university
Last synced: 19 days ago
JSON representation
A Linux command line interpreter written to mimic some of the basic commands used in Linux.
- Host: GitHub
- URL: https://github.com/patrickshaw/linux-cli-example
- Owner: PatrickShaw
- License: mit
- Created: 2017-04-22T11:22:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-24T10:33:42.000Z (over 7 years ago)
- Last Synced: 2024-04-14T12:46:37.301Z (9 months ago)
- Topics: assignment, cli, linux, operating-systems, study, university
- Language: C
- Homepage:
- Size: 394 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Command line interpreter
## FTI2070 Operating Systems - Assignment 1
### Running the basic interpreter
1. Navigate to and open a terminal in the Basic/bin folder
2. Enter `./bin/basic_cli`
3. The basic CLI should now be running. You may now enter commands into the CLI or type help to display the user manual.### Running the advanced interpreter
1. Navigate to and open a terminal in the Advanced/bin folder
2. Type `./bin/advanced_cli`
3. The advanced CLI should now be running. You may now enter commands into the CLI or type help to display the user manual.### Commands
`clear`
Clears the output screen.
`cd `**``**
Changes the default directory to **``**.
If the argument is not present, the current directory is changed to the *HOME* environment.`dir `**``**
Lists the contents of the given directory **``**.`echo `**``**
Prints the first **``**.
A comment is a sequence of characters start with a double quote character.
It is terminated by the next double quote.`help`
Displays the user manual using the less command.`pause`
Pauses the execution of the CLI program until the Enter key is pressed.`quit`
Stops executing the CLI program and terminates.`new `**``**
Create a new file with name **``**.`cp `**` `**
Copy the contents of an existing file with name **``** to a new file with`name `**``**
`find `**` `**
Displays the number of occurrence of the character **``** in an existing file with name **``**.`run `**``**
Execute any executable program with name **``**.`halt `**``**
Stop executing the program with name **``**.### Using command arguments that include spaces
The CLI seperates command arguments/parameters by spaces. However, command arguments can be combined by encapsulating them within double quotation marks.#### Example
The following command will not work:
`cp ./original file with space ./new file with whitespace`The following command will work:
`cp "./original file with whitespace" "./new file with whitespace"`