Question: From the previous exercises, you have 2 files in your Linux installation: file 1 . txt and file 2 . txt , both with one
From the previous exercises, you have files in your Linux installation: filetxt and filetxt both with one million rows of random numbers. Create a new script, doublenumbers.sh to read each line of filetxt storing the number from each line into a variable, then write a value that is double the original number into another file called newfiletxt Once this is done for the entire contents of filetxt display the time it took to run. Your script might look as follows:
#binbash
SECONDS
while read r number
do
let "number
echo $number newfiletxt
done filetxt
duration$SECONDS
echo $duration
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
