[Ilugc] Sed info

  • From: Noorul.Islam@xxxxxxxxxxx (Noorul Islam)
  • Date: Wed Feb 16 16:38:50 2005

for ((i=0; i< 100; i++ ))
do
    sed -n '$ip' txt2
done

ilugc-bounces@xxxxxxxxxxxxx wrote on 02/16/2005 04:19:59 PM:

Hi all,

`sed -n '1p' txt2` --it displays on first line of file txt2

How ever if Iwant to use a loop replacing 1 with i as

for ((i=0; i< 100; i++ ))
do
   Each_line=`sed -n '$ip' txt2`
   echo $Each_line
done

here i find it echos p, 1p, 2p..., 99p 

but I want the output of each line..

Any pointers ..

-Raja

_______________________________________________
To unsubscribe, email ilugc-request@xxxxxxxxxxxxx with 
"unsubscribe <password> <address>"
in the subject or body of the message. 
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Other related posts: