>\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,
I think a lot of people will be interested if somebody can post
the script he/she is using for authentication in case of a dial up connection (along with instructions on how to modify it, of course).
Philip had mentioned that he knew of an easier way. Philip, do let
us know...
Thanks.
Parul Mathur
How Linux saved Amazon millions
Online retailer Amazon.com saved millions of dollars from its technology
costs last quarter by switching to the Linux operating system, a disclosure
that could provide some guidance for other companies seeking to cut expenses
in a stagnant economy.
http://news.cnet.com/news/0-1003-200-7720536.html?tag=mn_hd
Navin Dhanuka
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
I have compiled and added new boot image to the lilo.
But on loading it is giving the follwing error.
Loading : newimage
Error : 0x40
boot : newimage
What might be the problem?
Thanks in Advance.
Mahesh Gharat
Dear Luggers,
Any one of you having Idea that How to prepare a Shell
Script in Linux..? Is it Like a Batch file of DOS..?
Plz . suggest me some Step by Step method that how to
prepare a Shell Script aling wiht some good URLs for
Shell Scripting.
[Ashish]
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
Hi,
I have uploaded a document called "Newbie's Guide to Linux" that I had
tried to write long ago and left unfinished. It can be accessed at:
http://db.ilug-bom.org.in/NGL/
Please read this for more info on what the document is all about:
http://db.ilug-bom.org.in/NGL/about.html#INTRO
I would like to ask for help from people to develop the NGL further ...
I will make the SGML sources available very soon, so that people can
have a look around and decide how they would like to contribute to it.
I have been using Docbook to create the NGL, and converting into HTML
using sgmltools package.
SameerDS.
=====
--
MTech Student
Reconfigurable Computing Lab
KReSIT, IIT-Bombay
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
Hi.
Redhat 7.2 ISOs (and files) are available on
db.ilu-bom.org.in
The URL is http://db.ilug-bom.org.in/redhat/
You can download the ISO, burn and use, or get individual packages you
wish to upgrade and install them.
There might be some changes in the directory structure over time, but that
shouldn't really be a problem. A nice web-interface is also being worked
upon.
cheers!
--
jaju
>
>
hello,
Several Lists that I am subscribed to send individual mails with the
subjects from the different members.
This helps the reader in looking at the subject and not wasting time on
irrelevant mails.
Anand
--
------------------------------------------------------------------------
Visit www.smbd.org <http://www.smbd.org> for
Free Tutorials, Source Codes and Other stuff.
------------------------------------------------------------------------