Skip to content

anupama-sinha/unix-repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unix-repo

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 :

  1. HelloWorld.sh - First Code to start with
  2. freqWordInFile.sh - Print frequency,word-length of all words distinctly of the file provided
  3. freqWords.sh - Frequency of words of a file provided
  4. sumOfSeries.sh - Print Sum of Series::=>1/(1)1+(1.2)/2^2+(1.2.3)/3^3+-------
  5. salaryEmp.sh - Calculation of salary of an employee
  6. primeFactorsOfNumber.sh - Prime factors of a number
  7. swapNumbers.sh - Swap 2 numbers without using 3rd variable
  8. baseConversion.sh - Base conversion based on input and output base
  9. binarySearch.sh - Binary Search of provided numbers
  10. bubbleSort.sh - Bubble Sorting of provided numbers
  11. calenderCheck.sh - Even/Odd Check for Calender Date
  12. calculator.sh - A Simple Calcutor
  13. divisibleByEleven.sh - Insertion of digit at the end to make it divisible by 11
  14. recursiveMergeSort.sh - Recursive Merge Sort
  15. nonRecursiveMergeSort.sh - Non-Recursive Quick Sort
  16. recursiveQuickSort.sh - Recursive Quick Sort
  17. 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
  18. 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.
  19. 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.
  20. 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.
  21. 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.
  22. monthsInRange.sh - Print month dates in format for the range provided.
  23. 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
  24. lucasSeries.sh - Lucas series displays the numbers by adding the previous two numbers.
  25. rootOfQuadraticEquation.sh - Finds roots of quadratic equation(ax2+bx+c=0)
  26. printMonth.sh - Print current month and year if command line argument is c;otherwise the given month
  27. permutation.sh - print permutation for 1,2,3
  28. deleteWord.sh - Delete all lines in a text file containing string "Unix"
  29. lineDelete.sh - Delete line containing this command line:=>filename string
  30. insertBegAndEndOfLine.sh - Insert << and >> at beg and end of each line
  31. printLines.sh - print a text file from line number m to line number n
  32. mergeSortedList.sh - Merge 2 sorted lists into one.
  33. secondLargest.sh - print second largest number
  34. caseConversion.sh - Converts lower to upper case for provided file
  35. digitalClock.sh - Prints Digital Clock
  36. fileDirCheck.sh - Check existence of file and if directory
  37. fileCheckAllDir.sh - Checks existence of a file in all possible directories
  38. msgTIme.sh - Print msg and time ...to be continued...

About

Learn about coding skills

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages