Skip to content

YoussefAboelwafa/Linux-Shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

photo_2023-03-06_18-05-08

Linux Shell

This is a Unix shell program
A shell is simply a program that conveniently allows you to run other programs This shell supports the following commands:

  1. The internal shell command exit which terminates the shell
  2. A command with no arguments
    • Example: ls, cp, rm
    • System calls: fork(), execvp(), exit(), waitpid()
  3. A command with arguments
    • Example: ls –l
  4. A command, with or without arguments, executed in the background using &.
    • Example: gedit &to run in the background or gedit to block terminal until finish
    • Details: In the case of gedit &, the shell must execute the command and return immediately, not blocking until the command finishes.
    • Concepts: Background execution, signals & signal handlers
  5. Shell builtin commands
    • Commands: cd & echo
    • Details:
      cd ~
      cd ..
      cd <absolute_path>
      cd <relative_path_to_current_working_directory>
      echo "wow" => wow
      export x=5
      echo "Hello $x" => Hello 5
  6. Expression evaluation
    • Commands: export
    • Details: Set values to variables and print variables values. No mathematical operations is needed.
    • Export Details: Accept input of two forms, either a string without spaces, or a full string inside double quotations.
    • Example:
      export x=-l
      ls $x => Will perform ls -l
      export y="Hello world"
      echo "$y" => Hello world

About

A simple-shell program in C language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages