Reading the file using loop statement
File name : job.txt
File Content :
Command 1:
Command 2:
File name : job.txt
File Content :
Data RAM:256 MB Bandwidth:1 gbps
Command 1:
        
              while read line
              do
                echo $line
              done <job.txt 
Output :Data RAM:256 MB Bandwidth:1 gbps
Command 2:
        
              for line in $(cat job.txt)
              do
                echo $line
              done <job.txt 
Output : 
Data RAM:256 MB Bandwidth:1 gbps
 
No comments:
Post a Comment