Skip to content

Repository for the final project of the Operative Systems subject. Universidad Rey Juan Carlos

Notifications You must be signed in to change notification settings

celezm/proyecto_shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shell vlite.1.0

Final Project for the Operative Systems subject. Consists of a command-line interpreter (shell) coded in C. The final version is located in the main.c file. This repository also includes a version without structs for the commands, and also a modified version (with a max number of args in each command).

Compilation, tests and usage

To compile the project:

gcc -g -c -Wall -Wvla -Wshadow main.c
gcc -g -o shell main.o
./shell

In order to debug and try the shell, there are test scripts in the /tests folder

Optional features added.

Here document

The lines without redirections can end with 'HERE{'. The command will use the lines written by the user as stdin until '}'

wc -l HERE{
abc
ji
}

Result environment variable (Ifok / Ifnot)

There is an environment variable called 'result' that contains the status of the last command executed (?$ in UNIX shell). Also, there are included 2 commands: ifok and ifnot.

Ifok will execute the next command if the last command was succesful. On the contrary, ifnot will execute it if the last command was not succesful.

Globbing

Globbing expansion.

About

Repository for the final project of the Operative Systems subject. Universidad Rey Juan Carlos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published