i want to read a file and print it on the screen by shell scripting , so i have find a simple code to do this :
#! /bin/bash
FILENAME=$1
Lines=$(wc -l < $FILENAME)
count=0
while [ $count -lt $Lines ]
do
let count++
LINE= `head -n $count $FILENAME | tail -1 `
echo "$count $LINE"
done
echo -e "\nTotal $count lines read"
, but i'm didn't understand the following line :
LINE= `head -n $count $FILENAME | tail -1 `
any help ??