0% found this document useful (0 votes)
34 views

Function While - Read - LINE - Bottom (# Method 2 # Zero Out The $OUTFILE $outfile While Read LINE Do Echo "$LINE" $OUTFILE: Done $INFILE)

This function reads lines from a file line by line, echoes each line, and appends it to an output file. It uses a while loop to read each line of the input file and append it to the output file, overwriting any previous contents of the output file.

Uploaded by

Mohd Waseem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Function While - Read - LINE - Bottom (# Method 2 # Zero Out The $OUTFILE $outfile While Read LINE Do Echo "$LINE" $OUTFILE: Done $INFILE)

This function reads lines from a file line by line, echoes each line, and appends it to an output file. It uses a while loop to read each line of the input file and append it to the output file, overwriting any previous contents of the output file.

Uploaded by

Mohd Waseem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

function while_read_LINE_bottom

{
# Method 2
# Zero out the $OUTFILE
>$OUTFILE
while read LINE
do
echo "$LINE" >> $OUTFILE
:
done < $INFILE
}

You might also like