Professional Documents
Culture Documents
ON
A. Write a script to create a bash file with the name, ‘gpawhile.sh’, to know the use
of while loop. In this, loop will iterate for 5 times. The value of count variable will be
printed from 1 to 5 at each step.
1
Government Polytechnic, Amravati
(An Autonomous Institute Of Govt. of Maharashtra)
Certificate
This is to certify that Mr/Ms. Chaitali Akhare , Pooja Atalkar , Swarupa Bhokare, Smita
Rathod, Freeha Naaz Ziya Akthar, Siddhant Shlke Identity Code. 19IF001, 19IF002,
19IF004, 19IF047, 20IF204, 20IF208, of Sixth Semester Diploma in Information Technology
has satisfactorily completed the micro-project entitled “A. Write a script to create a bash file
with the name, ‘gpawhile.sh’, to know the use of while loop. In this, loop will iterate
for 5 times. The value of count variable will be printed from 1 to 5 at each step. B.
Configure the applications through RPM” for the academic year 2021-2022 as prescribed in
the curriculum.
2
Annexure-I
PART A
Create a bash script, you place #!/bin/bash at the top of the file.
Then, change the permissions on the file to make it executable:
$ chmod u+x scriptname
To execute the script from the current directory, you can run ./scriptname and pass any
parameters you wish.
When the shell executes a script, it finds the #!/path/to/interpreter.
It then runs the interpreter (in this case, /bin/bash) on the file itself.
The #! convention is why so many scripting languages use # for comments.
3
S.N. Name of Resource/material Specifications Qty Remarks
1 Computer/ laptop Laptop/Computer with 1
minimum i3 processor
and 2 GB RAM
2 Operating System Linux 1
4
Annexure-II
PART B
Create a bash script, you place #!/bin/bash at the top of the file.
Then, change the permissions on the file to make it executable:
$ chmod u+x scriptname
To execute the script from the current directory, you can run ./scriptname and pass any
parameters you wish.
When the shell executes a script, it finds the #!/path/to/interpreter.
It then runs the interpreter (in this case, /bin/bash) on the file itself.
The #! convention is why so many scripting languages use # for comments.
5
minimum i3 processor
and 2 GB RAM
2 Operating system Linux 1
6.0 Output
Output is attached at the last of report.
6
a) Write a script to create a bash file with the name, ‘gpawhile.sh’, to know the use
of while loop. In this, loop will iterate for 5 times. The value of count variable will be printed
from 1 to 5 at each step.
Syntax:
#!/bin/bash
Output:
7
b) Configure the applications through RPM.
Now, you can use the wget command to download the .rpm file you want. Enter the following:
wget http://some_website/sample_file.rpm
The system should reach out to the website and download the file to your current working
directory.
The -i switch tells the package manager you want to install the file.
More information on the RPM installer can be found in the RPM documentation.
8
sudo yum localinstall sample_file.rpm
The local install option instructions yum to look at your current working directory for the
installation file.
Note: YUM stands for Yellow dog Updater Modified. Normally, yum looks to your enabled
software repositories for new software packages to install. More recent verbiage suggests
using install instead of local install, but it’s up to you.
Install RPM on Fedora
To install an .rpm package on Fedora Linux, enter the following:
Unlike many Linux tools, DNF is not a set of initials. It is merely the next evolution of
the yum package manager.
The -e option instructs RPM to erase the software. Check RPM Dependencies
So far, this guide assumes the software either doesn’t have dependencies or already has them
installed.
To check the .rpm file for dependencies using the following command:
9
sudo rpm -qpR sample_file.rpm
If there are any missing dependencies, you can install them from the standard repositories
using yum or dnf. If your software requires other non-standard software, it will often be noted in
the installation instructions.
10