Skip to content

bazileros/simple_shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Shell

Simple~shell Screenshot

Simple Shell is a basic UNIX command line interpreter implemented in C. It provides a simple interface for users to execute commands, handle built-in functionalities, and perform variable substitution. The shell supports various features such as executing external commands, handling built-in commands, environment variables, aliases, and file input.

Features

  • Execute external commands
  • Handle built-in commands: exit, env, cd, alias
  • Perform variable substitution using environment variables ($VAR) and special variables ($?, $$)
  • Support command execution from a file
  • Handle comments (#) in command input
  • Support command separation with ;, logical operators && and ||
  • Change the current working directory and update the PWD environment variable
  • Print and manage aliases

Getting Started

To compile the shell, run the following command:

gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh

To run the shell in interactive mode, use:

./hsh

To run the shell in batch mode with a file, use:

./hsh [filename]

Usage

Once the shell is running, you can type commands and execute them. Here are some examples:

$ ls
$ pwd
$ cd /path/to/directory
$ alias list="ls -l"
$ list
$ exit

For more information on the supported commands and usage, refer to the documentation.

Documentation

The documentation for the Simple Shell project are available in the ressources provided by ALX holberton school. It includes detailed explanations of the shell's features, supported commands, and usage examples.

Contributing

Contributions to the Simple Shell project are welcome! If you find any bugs, have suggestions, or want to add new features, please open an issue or submit a pull request.

License

This project has no official license, however completed part of ALX SE internship in collaboration with Holberton school.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages