Hello,
this is the script -
this is the error message on option 3 only
I set the shell script permissions to -
As it was what the book specified to use in the first chapter of the shell scripting chapters.
I checked the "18G..." results with error , by changing lines #33 and #36 by adding
the program produces no error, but of course it needs the password to be typed, this confirmed the results of "18G...", as correct. In that the script, as in screenshot above, has the permission denied error but is producing the correct results shown on the next line in the terminal after the error, on the screenshot above.
Options 1, 2, and 0 work without any errors in the program.
The only changes I have made to the script from the book is to beautify the code alignment to my liking.
The error happens before this when run, and still does, so it has not affected the programs functioning.
I would like some help as to how to run this script on option3 without it producing the error.
this is the script -
this is the error message on option 3 only
I set the shell script permissions to -
Code:
chmod 755
As it was what the book specified to use in the first chapter of the shell scripting chapters.
I checked the "18G..." results with error , by changing lines #33 and #36 by adding
Code:
sudo
the program produces no error, but of course it needs the password to be typed, this confirmed the results of "18G...", as correct. In that the script, as in screenshot above, has the permission denied error but is producing the correct results shown on the next line in the terminal after the error, on the screenshot above.
Options 1, 2, and 0 work without any errors in the program.
The only changes I have made to the script from the book is to beautify the code alignment to my liking.
The error happens before this when run, and still does, so it has not affected the programs functioning.
I would like some help as to how to run this script on option3 without it producing the error.