Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by FinnMan

  1. FinnMan

    Parsing Weblogs for ISP info

    I'm looking for a quick way to parse access logs and identify originating ISP based on the IP address. I can script something up that does a whois query but these logs are rather large and that seems a little 'dirty'. Anybody by any chance know a more efficient way? Thx!
  2. FinnMan

    Insert LF or CR with SED

    Wow..that's a beautiful sight after all the mangled text I've seen. Instead of search/replace, could AWK instead do it after every fourth comma? ./FM PS - I still love to see this in SED if it could be done...
  3. FinnMan

    Insert LF or CR with SED

    I have a single line file that I'm trying to insert some line breaks into. I seem to be failing miserably as I continue to end up with a single line. In short: sed -e 's/%,/%CR/g' file I'm wanting to find each occurence of "%," and replace it with "%" and then a new line. In exchange for...
  4. FinnMan

    Sed syntax

    Ouch --- that just took every line starting with line 'word' and duplicated it once. ./FM
  5. FinnMan

    Sed syntax

    sed -e '/word/q' filename The above deletes everything after the line containing 'word'. How do I change it so that it includes deleting the line containing word? Thx, ./FM
  6. FinnMan

    Parsing HTML Tables

    I can't believe I racked my brain on this. Lynx was the solution. I used the -dump option. The end result is I get one nice long page instead of the double column page that existed. This makes it much easier to strip and parse. On a side note, I did discover html2text. It's a wonderful utility...
  7. FinnMan

    Parsing HTML Tables

    I'm working with some web pages that contain a lot of tables. Apart from writing some extensive regex, does anybody know of any tools or scripts out there for use with parsing tables from web pages. Perl has a module for it but it's not really up my alley so to speak. Thx, FM
  8. FinnMan

    PREG_MATCH

    That will return ' TEXT: data ' when I only want to return 'data'. Is there a simple method to pull just data or should I use strstr and chop it?
  9. FinnMan

    PREG_MATCH

    I have a variable $result (for sake of discussion) that contains a bunch of html. I'm trying to grep out a particular section to assign to a another variable. My HTML likes the following: *************************** <br>TEXT: data<br><br></body> *************************** I simply want to put...
  10. FinnMan

    PHP/Curl Authentication

    Disregard. I just found it. I had to drop the postfields option and use CURLOPT_USERPWD ./FM
  11. FinnMan

    PHP/Curl Authentication

    I have to ask for help before I go insane :-P ********************************************* I have the following curl script (works great) which I'm trying to convert to PHP/Curl. Any pointers on what I'm doing wrong would be great. curl -s -u username:password -k -F userid=username...
  12. FinnMan

    Passing Variables To Expect

    I have simple expect script that I want to pass a variable to via a web form. Any suggestions on how this can be done? One method I've seen is to dynamically generate the expect by using a simple echo from bash and then executing the expect script. Is there a way to pass the variable to expect...
  13. FinnMan

    Working With Multiple Arrays

    Yeah, I understand the "what" but I'm not getting the "why". Is there a way to recall hold.$$ back as an array?
  14. FinnMan

    Working With Multiple Arrays

    Vlad, Can you explain that to me? Why is $currentHold executing correctly as an array but not $quotaHOLD ? Thx! FM
  15. FinnMan

    Working With Multiple Arrays

    Yes, $quotaHOLD is a file. I use the following to pipe a list of values into it (which that part works ok): ldapscript2 $i | grep Quota | awk '{print $2}' >> $quotaHOLD And I want to go straight down each of the values in $currentHold and compare it with $quotaHOLD. Logically, I'd think it...

Part and Inventory Search

Back
Top