I need help with this script. I am using RedHat 6.1 Linux ® Script 3 Create a ne
ID: 3545004 • Letter: I
Question
I need help with this script. I am using RedHat 6.1
Linux® Script 3
Create a new file called week3prog3[name].scr.
Change the permissions on this new file to add the execute bit for user, group, and owner.(I know how to do this.)
Create two files.
·File1 has one line with the value of 5.
·File2 has one line with the value of 100.
*** Please show me what each file is suppose to have. I believe I would use Vi editor and name one file1 and will have just one line with the value of 5, the second one would be name file2 and will have one line with a value of 100***
Edit your new file using Gedit or VI and change it so it performs the following actions:
I use VI editor and know how to create the file, just need the code.
·Read the values from the two files above (file1 and file2).
·Divide the value from file2 by the value in file1.
·Output the result of this calculation to a new file called file3.
Note. Remember to include #!/bin/sh as the first line of your script.
<Insert your source code here.>
<Insert the output here. Use a screenshot of the output with the input requirements specified in the assignment.>
Explanation / Answer
this is the source code
https://www.dropbox.com/s/ft9mdve48vtvps5/week3prog3.sh
save this content in a file
change the permission of the file
chmod +x filename
./filename
here i considered the file names are File1 and File2 change them if required
output will be 20