This repository contains solutions for the Unix Programming Lab exercises, categorized into Part A (Shell Scripting) and Part B (C/C++ Programming).
3rdsemUnixLab/
│-- Part A/ # Shell Scripts
│-- Part B/ # C/C++ Programs
│-- README.md
- Student Database Management: Create and display student details with department-wise frequency.
- File Comparison & Deletion: Remove the second file if its contents match the first.
- File Type Checker: Identify if the argument is a file, directory, or something else.
- Convert Files to Uppercase: Convert the content of given files to uppercase.
- Compare File Permissions: Check if two files have identical permissions.
- String Operations:
- Find length of a string
- Check if a string is NULL
- Compare two strings
- Reverse Command Line Arguments: Print arguments in reverse order.
- Reverse a Number: Print the reverse of a given number.
- Fibonacci Series: Print the first 25 Fibonacci numbers.
- Prime Numbers in a Range: Print prime numbers between a given range.
- Linear Search: Search for an element in an array using linear search.
- Find Largest of Three Numbers: Use a function to determine the largest number.
- Implement UNIX Commands (ln, mv, rm) using APIs.
- File Handling:
- Display file contents
- Copy contents of one file to another
- Read Every 100th Byte: Read and print every 100th byte from a file.
- File Information Display: Show file type and Inode details.
- Process Creation:
- Using
fork()andvfork() - Demonstrate Zombie process & avoid it
- Create an Orphan process
- Using
- Parent Process Handling: Use
wait()to catch a child’s exit code. - Race Condition Demonstration.
- UNIX System API Implementation.
- Signal Handling:
- Catch, ignore, and accept
SIGINT.
- Catch, ignore, and accept
- Inter-Process Communication:
- Create, write, and read from a pipe
- Create a parent-child pipe communication
- Run Shell Scripts:
sh 1.sh
- Compile and Run C Programs:
cc program.c ./a.out
Maintained by: Nithish Reddy