Basic Shell Scripting - 3

Basic Shell Scripting - 3

Real Life Script

Accessing Data from a file

  • Create a 1st script that will pull errors from a file.

  • Create 2nd script that will format the output of administrative commands

#!/bin/bash
# Date Created: 02/26/2024
# Author: Shounak Khulape
# Description: This script is to check other if statement.
# Date Modified: 02/26/2024

grep -i error /home/oracle/scripts/varlogerror/messages > /home/oracle/scripts/varlogerror/push-error

For loop Scripts for File System 1

  • Multiple Script

  • Simple Counting

  • Creating multiple files with different name

  • Create multiple files with user input

  • Assign write permission to files

  • Assign write permission to files with total time it will take.

For loops Scripts for File System - 2

  • Rename all *.txt files extension to .none

  • Check to see if files exist

Directory Assignment

  • Directories in /home

  • Users in /etc/passwd file

  • Match users from /etc/passwd to /home/DIR

That's great if you have make till here you have covered Basic Shell Scripting Practice 2

If you liked what you read, do follow and any feedback for further improvement will be highly appreciated!

Thank you and Happy Learning!👏