Skip to content

Diegoacosta127/simple_shell

Repository files navigation

Simple Shell

simple_shell

A simple UNIX command interpreter.

Code Size Repo Size Total Lines

Context

ubuntu Ubuntu 20.04.3 LTS

Script Bash

C Compiler version: 9.3.0-17ubuntu~20.04

Vim

Betty Everybody loves Betty

GitHub

Compilation

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

Usage

In the interactive mode, execute the file hsh, and then the prompt line will appear

root@ubuntu:/# ./hsh
($)

In the above example, the prompt line waits for the user enters a command to execute it. After the execution, the prompt line appears again. To exit the shell the user just have to write exit or type ctrl + d.

In the non-interactive mode, a command must be passed by pipe

echo "ls -la /tmp | ./hsh"

In the above example, it'll list with long format all the content from the directory /tmp, then the prompt won't appear again.

Credits

  • Diego M. Acosta C. followers-diego Linkedin Diego
  • Ignacio Castellán García followers-nacho Linkedin Diego

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors