Write shell scripts to accomplish the following system admin

Write shell scripts to accomplish the following system administration tasks:

a). MyExecutables: List all the executable files in the current working directory.

b). MyFiles <username> <directory>: Check the following attributes of a file in the specified directory:

Read permission

Write permission

Execute permission

Ordinary or special file

Check if the file exist

Check if there is anything contained in the file

Check if the file is a directory

The appropriate response must be provided for each of the above attributes.

c).Find out the biggest number from three given numbers. The numbers must be supplied as command line argument and an error must be printed if sufficient arguments are not supplied.

Notes

a). Ensure appropriate comments are within each script.

b). Each script with the associated output should be submitted.

Solution

3)out the biggest number from three given numbers:

echo \"Enter three Integers:\"

read a b c

if [ $a -gt $b -a $a -gt $c ]

then

    echo \"$a is Greatest\"

elif [ $b -gt $c -a $b -gt $a ]

then

    echo \"$b is Greatest\"

else

    echo \"$c is Greatest!\"

fi

Write shell scripts to accomplish the following system administration tasks: a). MyExecutables: List all the executable files in the current working directory.

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site