Question: file: #!/ bin/bash File='data_file.t xt' i=1 While read line; do echo Line No.$i :$line i=$((i+1)) done

file:

#!/bin/bash

File='data_file.txt'

i=1

While read line; do

echo Line No.$i:$line"

i=$((i+1))

done<$file

is this a valid shell script that helps to read data from a file if not please modify it

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!