Saturday, March 18, 2023

Simple Bash Script

 

Bash is a Unix command line interface for interacting with the operating system, available for Linux. Bash scripts help group commands to create a program. All instructions that run from the terminal work in Bash scripts as well.

Bash scripting is a crucial tool for system administrators and developers. Scripting helps automate repetitive tasks and interact with the OS through custom instruction combinations. The skill is simple to learn and requires only basic terminal commands to get started.

Please find the below sample script of backuping the txt file .

#!/bin/bash

Path=/opt/folder1/folder2

cp $path/folder3/test.txt test.txt_backup_original

No comments: