Read a file line by line in shell script

How to read a file line by line in shell script ?


There are many ways to handle file operations in UNIX. here is the one way of paring the input file line by line in shell script. If you know the basic shell scripting then it will be easy to understand.



filename=$1
cat $filename | while read line 
do 
echo “$line” 
done 



Comments

HTML/JAVASCRIPT

Popular posts from this blog

Teradata SQL Assistant Shortcuts

How to List All Tables in Oracle, MySql, Teradata, DB2 and PostgreSQL

7473 Requested sample is larger than table rows. All rows returned