>\root\sandeep\log111.txt
>This files has a lot of text and one particulr line is .....
>##Date 24-07-2001
>
>Now
>1. I need to locate the line "##Date" in the above file
>2. I then need to store the date value "24-07.2001" in a variable.
Which language you are using? I assume Perl, because this is much simpler in
Perl.
1. Open the file for reading.
2. Search for the above string by reading every line. $_ variable
contains the current line. You can do this by using pattern searching
operations in Perl.
3. Once you find the above line then split that line at spaces and collect
the required date in a variable.
Here is the code which I would prefer to write.
open(RH,"</root/sandeep/log111.txt");
while(<RH>)
{
if($_ =~ /##Date/)
{
$flag = 1;
}
else
{
$flag = 0;
}
if($flag eq 1)
{
($str1, $str2) = split(/ /, $_);
$date = $str2;
}
}
Hope this is very much clear.
Regards,
Mayur
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Here's the situation:
Net DSL Windowsbox LAN(dhcp) Linuxbox
The LAN, naturally, has a 192.168.0.0 range of IPs (I think it's a
class C). The DSL modem is connected to the Winbox on USB and the LAN
is a 5-port hub supporting a windows network, with my Linux box (say
hello to gort, folks) creeping in using dhcpd.
The Linux box, and any box on the LAN, can access everything. I think
the Net cannot access anything but the Windows box on the DSL modem
(see <http://gort.cjb.net/>. That's the Winbox.).
Now I need POP3 (and HTTP et al, if possible) access to the Linux box
from the outside world. IP forwarding is enabled on the Winbox.
What do I do now?
PS: Can I get a static IP on the internal network with minimal changes
to the other boxen?
--
Satya. <URL:http://satya.virtualave.net/>
US-bound grad students! For pre-apps, see <URL:http://quickapps.cjb.net/>
Hi all,
been trying to mount linux on a windows fat32.
lilo didnt get installed so using loadlin.
loadlin c:\vmlinuz root=/dev/loop0
doesnt seem to work and linux isnt booting.
issues a kernel panic error.
even when i try to use this
loadlin c:\vmlinuz root=/dev/hdax
where x is 1 to 8 all combinations...
same error message
any suggestions.
thanks,
Prem.
Hi Luggers!
One of my friends has SiS6215c Display Card with 2mb VRAM. He
recently installed SuSE 7.1 in his machine. The monitor is Sampo
AlphascanSV.
The problem is that, the display card is not being detected.
Hence he's not being able to run X. When he tried to run SaX, the
SuSE X configurator, not even the initial screen comes up. Entire
screen looks very garbled and after some time SaX exits. We tried
xf86config, but we did not get any near as my freind has
misplaced all of the Manuals and docs. We also tried our hands
during installation, but that too went in vain.
Anyone having similar configuration, please help. I think there
was a patch available for the display card, but I cud not find on
the net.
TIA.
Warm Regards,
$ sonpal -kj
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Dear all,
I have installed postfix for experimenting..
Now what I want is that user having from address with my domain name can only relay.
can somebody tell me how do i do this.
regards
lilo
I need a quick list of linux packages that would attract an engineering
crowd - professors as well as students. Send this to me privately.
Also, if anyone writes/sells bootROM for 16bit/32 bit network cards, for
booting diskless machines, contact me with details.
Philip
--
"An ounce of prevention is worth a ton of code."
-- an anonymous programmer
Visit my webpage at http://www.ncst.ernet.in/~philip/
Read my writings at http://www.ncst.ernet.in/~philip/writings/
MSN philiptellis Yahoo! philiptellis
Hi Friends,
I have installed Linux 7.1 on my disk, from last few days I am unable to access the X window
when I login as root, but in case if I login as a normal user then every thing works fine,
I went through the xconfigurator, but it also didn't work, I have a backup copy of XF86config, I copied it in the respective folder, but it didn't work
I am not much familiar to the prompt, so can any one tell me to get the X window back as a root user,
Chalo then
Tata,
Sunil.
Hi,
Anybody installed GNU/Linux computers with M2/Cyrix/AMD cpu. Have you
encountered any problems. A friend of mine has a M2 system and wants to
install gnu/linux on it and wanted to know if there are any known problems
since these are not Intel chips.
I plan to do a course in c, c++ and unix. Any good institutes that you know
of. I stay at borivili and work at nariman point and am looking towards an
institute in the western suburbs. Also, any good books you recommend.
Regards,
Noel.
Gnu/Linux registered user #226476
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Philip S Tellis spewed into the ether:
<snip>
>Any idea why this is allowed (there is a special rule to allow it) at
>all?
A NULL sender <> is required for bounces/error messages.
This is required by RFC 2821 (originally 821).