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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. macubergeek

    removing parens

    Wow thanks guys I'm on target now I gotta grok regular expressions better.... **runs to re read regex book jim
  2. macubergeek

    removing parens

    Sorry perhaps I was unclear This is the output I want: when I do arp -a I get this kind of output: 192.168.1.1 192.168.1.5 192.168.1.100 192.168.1.101 192.168.1.255 Now I'm thinking this is a simple regex find and delete. I'm just uncertain how to match ( and ) and replace with empty string.
  3. macubergeek

    removing parens

    when I do arp -a I get this kind of output: (192.168.1.1) (192.168.1.5) (192.168.1.100) (192.168.1.101) (192.168.1.255) All I want to do is to remove the parens and keep the ip address. I've tried this with sed and gotten nowhere. sed 's/\(//g'
  4. macubergeek

    Left Join?

    Thanks it was the Where statement I was messing up.
  5. macubergeek

    Left Join?

    I have this query against database nessus table results: select count(risk) as "Subtotals:",risk as "Risk Level" from results group by risk; select count(risk) as "Subtotals:",risk as "Risk Level" from results group by risk; and it returns: Subtotals: Risk Level 36 2 304...
  6. macubergeek

    Want to make a small tweak

    Ok here's my code: foreach $line (@aonly) { print FH $line,$item,'WHAT SETTING SHOULD BE:'; chomp $line; } problem is I miss the first line I get: yayayayayaya What Setting Should be: yayayayaya What Setting Should be: ababababab What Setting Should be: xxxxxxxxxx What Setting Should be:
  7. macubergeek

    Want to make a small tweak

    I tried your suggestion. It does this: blah blah blah blah blah blah blah blah blah is not in compliance but I'm trying to do: blah blah blah is not in compliance blah blah blah is not in compliance blah blah blah is not in compliance how would I do that?
  8. macubergeek

    Want to make a small tweak

    I currently have a script that works fine. It loads file A into an array. It then searches for each line in @A in file B. It then reports back to me which lines in @A that id DOESN'T find in file B. I'm printing out these results with: print FH (@aonly, $item); ------------------------- The...
  9. macubergeek

    Trouble installing MySQL on Mac OS X Tiger (10.4)

    The problem is you have not assigned a password to the root account. Mysqld won't start up with a blank root password. do: $mysqladmin -u root -p Enter password: <enter the root password you want here> <enter> then as root do: mysqld_safe & this will start the mysqld server. Depending on how...
  10. macubergeek

    Delete every row

    lgarner and TonyGroves, thanks! Some how I was stuck in the SELECT syntax format. DELETE from <tablename> worked fine.
  11. macubergeek

    Delete every row

    I'm trying to figure out the sql syntax to delete every row from a specified table. I don't want to drop the table just clean out every row... I've tried: DELETE * FROM TABLE_NAME; DELETE * FROM TABLE_NAME WHERE id NOT NULL; no luck. Can someone give me a shove in the right direction?
  12. macubergeek

    SQL placeholder passed on command line in Perl

    **slapping forehead** thanks
  13. macubergeek

    SQL placeholder passed on command line in Perl

    From experimenting, I've found that (?) and ? both work. Does anyone know if it's possible to pass more than one placeholder? Say I want to specify two or more terms in the SELECT statement can I use ? and ?1? or some other form of multiple placeholders inside the SQL query?
  14. macubergeek

    SQL placeholder passed on command line in Perl

    erickbrunson good point thanks
  15. macubergeek

    $ARGV[0] in mysql query

    hmmm let me try that stevexff, thanks!
  16. macubergeek

    mysql on macos x

    PS I ran a test where I created a new database and found that as root I can create a database and inert into it just fine. Again this is creating the database on the mac not importing into it via mysqlimport.
  17. macubergeek

    mysql on macos x

    I'm having trouble adding records to a database in mysql on macos x. Just some background: I loaded the database from a mysqldump file taken off a windows box. database is named lookup with tables: ports, icmp and icmpcode. I have two users jamesk and root here are the grants...
  18. macubergeek

    $ARGV[0] in mysql query

    Aha figured it out: this works: $sth = $dbh->prepare (qq{SELECT * FROM ports WHERE Port = (?)}); $sth->execute ($ARGV[0]);
  19. macubergeek

    $ARGV[0] in mysql query

    nope removing the quotes gives me: C:\Documents and Settings\kellyji\Desktop>perl port.pl 23 DBD::mysql::st execute failed: You have an error in your SQL syntax; check the m anual that corresponds to your MySQL server version for the right syntax to use near 'VALUES ('23')' at line 1 at port.pl...
  20. macubergeek

    $ARGV[0] in mysql query

    I'm having a problem with line 26. As you can see I'm trying to pass the value of Port as $ARGV[0] on the command line: ------------ CODE 1 #!/usr/bin/perl 2 ################ 3 ## 4 ################ 5 use DBI; 6 use strict; 7 8 ###############...

Part and Inventory Search

Back
Top