Sometime today, Mayur Joshi wrote:
open(RH,"</root/sandeep/log111.txt");
while(<RH>)
{
if($_ =~ /##Date/)
{
$flag = 1;
}
else
{
$flag = 0;
}
if($flag eq 1)
{
($str1, $str2) = split(/ /, $_);
$date = $str2;
}
}
Or, from the command line,
perl -ne 's/^Date## +(.+)$/$1/ && print $_' </root/sandeep/log111.txt
Manish
--
Some people manage by the book, even though they don't know who
wrote the book or even what book.