This repo has been designed so as to enable a beginner learn Unix Shell Scripting with multiple codes with ease. This doesn't cater to optimization of code.
Will be updating again with optimized programmes with increased understanding of foreground and background jobs in coming days. Enjoy learning!!!
Description of the codes as below :
- HelloWorld.sh - First Code to start with
- freqWordInFile.sh - Print frequency,word-length of all words distinctly of the file provided
- freqWords.sh - Frequency of words of a file provided
- sumOfSeries.sh - Print Sum of Series::=>1/(1)1+(1.2)/2^2+(1.2.3)/3^3+-------
- salaryEmp.sh - Calculation of salary of an employee
- primeFactorsOfNumber.sh - Prime factors of a number
- swapNumbers.sh - Swap 2 numbers without using 3rd variable
- baseConversion.sh - Base conversion based on input and output base
- binarySearch.sh - Binary Search of provided numbers
- bubbleSort.sh - Bubble Sorting of provided numbers
- calenderCheck.sh - Even/Odd Check for Calender Date
- calculator.sh - A Simple Calcutor
- divisibleByEleven.sh - Insertion of digit at the end to make it divisible by 11
- recursiveMergeSort.sh - Recursive Merge Sort
- nonRecursiveMergeSort.sh - Non-Recursive Quick Sort
- recursiveQuickSort.sh - Recursive Quick Sort
- sortedBinarySearch.sh - Binary Search in a sorted array of Integers • Elements are taken input in an array which leads to static memory allocation. Though number of elements to be entered is known first. • Binary Search method is always done in a sorted array. • In each iteration,array is sub-divided to equal size
- freqWordGrep.sh-Frequency of Words using grep command • According to this algorithm, each word is copied to a separate file and copied. • While appending a character to a file, Original file is removed to ensure safety.
- stringPalindromeCheck.sh - Check if a word is a palindrome • Usual bit-to-bit extraction is not done.’rev’ implicitly reverses the word. • Original word is stored and then comparison is done after reversing.
- reverseString.sh - Reverses a String • This algorithm extracts each bit from the end and wites to a file. • For reversing command 'rev' could also be used. • Before appending to files, files are removed for safety. • For reading command line arguments, positional parameters are set for ease.
- findPrimeInRange.sh - Finding Prime Numbers within a Range provided. • Here the files to be used are removed for safety. • Comlexity of the algorithm has been reduced by using command ‘factor’ which lists the factors of a number in an ascending order. • For reading the command line arguments, positional parameters are set.
- monthsInRange.sh - Print month dates in format for the range provided.
- gradeCalculation.sh - A student examination file contain records in the following format: Name,Paper-1,Paper-2,Paper3,Paper-4 The student is awarded grades as per the following rules: Credit=(Total marks obtained/Total Marks)*10 Credit points above or equal to 8- Grade 0 Credit points between 7.0-7.9- Grade A Credit points between 6.0-6.9- Grade B Credit points between 5.0-5.9- Grade C Credit points between 4.0-4.9- Grade D Credit points less than 4.0- Supplementary
- lucasSeries.sh - Lucas series displays the numbers by adding the previous two numbers.
- rootOfQuadraticEquation.sh - Finds roots of quadratic equation(ax2+bx+c=0)
- printMonth.sh - Print current month and year if command line argument is c;otherwise the given month
- permutation.sh - print permutation for 1,2,3
- deleteWord.sh - Delete all lines in a text file containing string "Unix"
- lineDelete.sh - Delete line containing this command line:=>filename string
- insertBegAndEndOfLine.sh - Insert << and >> at beg and end of each line
- printLines.sh - print a text file from line number m to line number n
- mergeSortedList.sh - Merge 2 sorted lists into one.
- secondLargest.sh - print second largest number
- caseConversion.sh - Converts lower to upper case for provided file
- digitalClock.sh - Prints Digital Clock
- fileDirCheck.sh - Check existence of file and if directory
- fileCheckAllDir.sh - Checks existence of a file in all possible directories
- msgTIme.sh - Print msg and time ...to be continued...