Linux (1)
Linux (1)
Assignment-4
On
Course: Linux
Semester: VII
Signature
Output:
2. Write a script that:
Takes a file name as input.
Checks if the file exists.
If it exists, print “File exists.”
If it doesn’t, print “file does not exist”.
Output:
3. Write a script that:
Accepts a number as input.
Checks if the number is even or odd.
Displays the result.
Output:
4. Write a script that:
Checks the disk usage percentage of the / partition.
If usage is above 80%, print a warning message.
If usage is below or equal to 80%, print "Disk usage is under control."
Output: