This repository contains a collection of shell scripts and C programs related to basic operating system functionalities. Each experiment is organized into separate folders (Exp 1 to Exp 8). Here's a brief overview of each experiment:
- Script:
basicCalculator.sh
- Description: This shell script implements a basic calculator functionality allowing users to perform addition, subtraction, multiplication, and division.
combinations.sh
: Generates all combinations of the numbers 1, 2, and 3.fileCompare.sh
: Compares two input files and determines if they are the same.
endOfScriptAtEND.sh
: Allows the user to input lines into a file until they type "end" or "END."reverseNumber.sh
: Reverses a user-input number.
scriptOfHead.sh
: Simulates the head command of bash.scriptOfTail.sh
: Simulates the tail command of bash.
- Script:
Exp5.sh
- Description: Manages directories with features such as listing directories, creating directories, modifying directories, and navigating.
database.txt
: Database file to store student details.DBMS.sh
: Manages student details in the database, allowing for addition, deletion, and modification.
- File:
Exp7.c
- Description: C code demonstrating the use of the fork system call to create child processes and obtain process IDs.
grep.c
: A C program replicating the grep command in Linux.test.txt
: A sample text file with 10 lines for testing the custom grep command.
- Compile the
grep.c
file. - Run the compiled executable with the following commands:
./grep test.txt contains life
(to find lines containing "life")../grep test.txt notcontains life
(to find lines not containing "life")../grep test.txt print
(to print the entire text file).
Feel free to explore each experiment folder for detailed scripts and functionalities. If you encounter any issues or have suggestions, please open an issue in the repository.