Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: A better spawnlog.txt cleaner

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    3

    A better spawnlog.txt cleaner

    Made this up real fast because sed is way to slow for me


    Code:
    #!/bin/bash
    #Spawnlog clean by helper.
    
    
    #change to where your spawnlog.txt lives
    cd /seq/share/showeq
    
    #make backup.
    cp spawnlog.txt spawnlog.txt.bak
    
    #Housecleaning time.
    egrep -v "^-:|[a-z]\(|corpse|_warder|familiar" spawnlog.txt > tmp.txt
    
    mv tmp.txt spawnlog.txt
    
    exit 0

  2. #2
    Did you SEQ today? BlueAdept's Avatar
    Join Date
    Dec 2001
    Posts
    2,008
    Heh...thanks the one I did was real quick and didnt feel like looking up they syntax.

    Mind if put that on my site to replace the one I did?
    Filters for ShowEQ can now be found here. filters-5xx-06-20-05.tar.gz

    ShowEQ file section is here. https://sourceforge.net/project/show...roup_id=10131#

    Famous Quotes:

    Ratt: WTF you talkin' about BA? (Ok.. that sounds like a bad combo of Diffrent Strokes and A-Team)

    Razzle: I showeq my wife

  3. #3
    Registered User
    Join Date
    Jul 2002
    Posts
    3
    Thats fine, I am currently expanding it to do a few more intelligent checks as well. I will post it here when its finished.

    Enjoy =)

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    70
    I wanted to test my script a few more times, but it's working fine. I'll rip out the debug stuff and send it to BA for upload.

  5. #5
    Registered User
    Join Date
    Apr 2002
    Posts
    70
    I'm attaching a .tar.gz file that will make the filter files. It will create a directory named "KnownMobs" which has a list of every mob that has been processed. This is used to prevent replications.

    To use it untar it in your seq directory "/usr/local/share/showeq/" and then "./GetMobs -f " and watch it go through a list of the zones.

    If you ahve a bug, post the spawnlog file and I'll update.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    Jul 2002
    Posts
    3
    There is something wrong with the pet cleaning regex - It matches on a few named mobs like Gornit00, Zordak_Ragefire00 and Zordakalicus_Ragefire00 for example.

    Working on cleaning it up a tad =)


    Otherwise I really like! =)

  7. #7
    Aelorean
    Guest
    Ok -- I will admit that I am a complete idiot when it comes to Perl ....can you tell me what I need to do to fix this error? Thanks!

    Code:
    root:/usr/local/share/showeq> ./GetMobs.pl 
    Uncaught exception from user code:
            Uncaught exception from user code:
            Can't locate Getopt/Mixed.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at ./GetMobs.pl line 6.
            main::BEGIN() called at Getopt/Mixed.pm line 6
            require 0 called at Getopt/Mixed.pm line 6
    BEGIN failed--compilation aborted at ./GetMobs.pl line 6.

  8. #8
    Registered User
    Join Date
    Jan 2002
    Posts
    1,508
    CPAN Module - Getopt::Mixed

    www.cpan.org

  9. #9
    Registered User
    Join Date
    Jul 2002
    Posts
    2
    to save a bit of of trouble
    you can also do perl -MCPAN -e `install PACKAGE`
    ie perl -MCPAN -e `install Getopt:Mixed`

    =)

  10. #10
    Registered User
    Join Date
    Jul 2002
    Posts
    29

    Re: A better spawnlog.txt cleaner

    Originally posted by helper
    Made this up real fast because sed is way to slow for me


    Code:
    #!/bin/bash
    #Spawnlog clean by helper.
    
    
    #change to where your spawnlog.txt lives
    cd /seq/share/showeq
    
    #make backup.
    cp spawnlog.txt spawnlog.txt.bak
    
    #Housecleaning time.
    egrep -v "^-:|[a-z]\(|corpse|_warder|familiar" spawnlog.txt > tmp.txt
    
    mv tmp.txt spawnlog.txt
    
    exit 0
    Hi All

    would someone mind explaining how to make this an ex file so I can run this by mouse click, Im still very new to Linux world.

    Thks :-)

  11. #11
    Registered User
    Join Date
    Dec 2001
    Posts
    1,262
    1) there is no such thing as an exe file in linux
    2) Take a look at chmod (type 'man chmod'), it will show you how to change the mode to executable.

    --Jeeves

  12. #12
    Registered User Mr. Suspicious's Avatar
    Join Date
    May 2002
    Posts
    667
    Im still very new to Linux world.
    Good places to start:

    http://www.linux.org
    http://www.linuxdocs.org

    http://www.yourdistro.org(com)/manual

    Don't take this the wrong way: but try to learn about the OS you are working with by actually reading the manual that comes with it... just think of it this way: if someone never used Windows and you'd tell him to "set your swapfile to static", would he know what you are talking about? Or even what to do? No... and instead of taking him by the hand 10 times a day and explain every step he would have to take... you'd direct him to the manual (which he can read in ease, at his own tempo, specifically designed to be easilly understood and well comprehensable)

    Another good thing to read is the pre-face section of: http://www.smoothwall.org/download/p....9/doc.faq.pdf very Very VERY worth the 15 minutes you will spend to read it.
    Last edited by Mr. Suspicious; 08-06-2002 at 07:36 PM.
    Before asking anything read the pre-face section of http://www.smoothwall.org/download/p....9/doc.faq.pdf

    after you've read it, you know what to do next...




    "Stay alert! Trust noone! Keep your Lazers Handy! Have a nice day." -- Provided courtesy of the Computer. The Computer never lies.

  13. #13
    Registered User
    Join Date
    Jan 2002
    Posts
    741
    I hope the other regulars don't flame me for this, but after following all of their advice, change into the directory where your file is and type:

    chmod 755 yourfilename

    That will make the file readable, writable, and executable by whatever user you are performing this as (probably root), and readable and executable by all other users. Those man pages and other documentation will help you understand why.

  14. #14
    Registered User
    Join Date
    Jul 2002
    Posts
    29
    Originally posted by Mr. Suspicious


    Good places to start:

    http://www.linux.org
    http://www.linuxdocs.org

    http://www.yourdistro.org(com)/manual

    Don't take this the wrong way: but .................................................. .......... it.
    Nope I do not take it the wrong way at all, thank you for your reply, the one from .... was far shorter and had me puzzled, the man chmod file on my box does not tell me much in the way of examples, but i have found out to do it with 755 and I saw a reference to -x so thanks again to all. I do some times wonder thou if some of the replys are just downright attempts to scare would be new commers right off, shame really as we all started out asking questions even after reading as much as we can, but then again even getting a manual to display when you dont know the commands or the short cuts is hard, we are not all experts.

    :-)
    TTFN
    Last edited by astraa; 08-06-2002 at 09:37 PM.

  15. #15
    Registered User Mr. Suspicious's Avatar
    Join Date
    May 2002
    Posts
    667
    I do some times wonder thou if some of the replys are just downright attempts to scare would be new commers right off

    but then again even getting a manual to display when you dont know the commands or the short cuts is hard, we are not all experts.
    You obviously didn't read the last URL (to the .pdf file) I provided.

    My grandparents accuse Windoo$ of the very same thing. Inprogramm manuals are usually less detailed and assume a greater basic knowledge then "real" manuals and so do most people's answers. How will you be able to refill your cars oil, if you don't even know what a hood, the contact-key or the windshield-wiper of your car is? . You know.. books... websites that have the books in HTML form... step-by-steps... HOWTO's... exactly the reason I meantioned those URL's because they have them.

    chmod is a basic Linux command (it's like right clicking a file in Windoo$ and changing it's properties) just go pickup a good book like "Linux for Dummies" and actually READ the manual of your distro and visit the wonderfull HOWTO's and "Linux for starters" websites... chmod (and a lot of other commands) ARE mentioned and explained to detail in them.
    Last edited by Mr. Suspicious; 08-07-2002 at 06:23 AM.
    Before asking anything read the pre-face section of http://www.smoothwall.org/download/p....9/doc.faq.pdf

    after you've read it, you know what to do next...




    "Stay alert! Trust noone! Keep your Lazers Handy! Have a nice day." -- Provided courtesy of the Computer. The Computer never lies.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is On
vB code is On
Smilies are On
[IMG] code is On