19bcs2848 - SWL 10
19bcs2848 - SWL 10
Experiment – 3.3
Aim: Write a shell script that displays a list of all the files in the current directory to
which the user has read, write, and execute permissions.
Description:
Linux is an open-source operating system (OS). An operating system is the software that
directly manages a system’s hardware and resources, like CPU, memory, and storage. The OS
sits between applications and hardware and makes the connections between all your software
and the physical resources that do the work. The command line is your direct access to a
computer. It's where you ask software to perform hardware actions that point-and-click graphical
user interfaces (GUIs) simply can't ask.
A bash script is a file containing a sequence of commands that are executed by the bash
program line by line. It allows you to perform a series of actions, such as navigating to a specific
directory, creating a folder, and launching a process using the command line.
Advantages of Bash scripting:
Bash scripting is a powerful and versatile tool for automating system administration tasks,
managing system resources, and performing other routine tasks in Unix/Linux systems. Some
advantages of shell scripting are:
Automation: Shell scripts allow you to automate repetitive tasks and processes, saving time and
reducing the risk of errors that can occur with manual execution.
Accessibility: Shell scripts are easy to write and don't require any special tools or software. They
can be edited using any text editor, and most operating systems have a built-in shell interpreter.
Integration: Shell scripts can be integrated with other tools and applications, such as databases,
web servers, and cloud services, allowing for more complex automation and system
management tasks.
Debugging: Shell scripts are easy to debug, and most shells have built-in debugging and
errorreporting tools that can help identify and fix issues quickly.
chmod +x Script.sh
Output: