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.
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'
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...
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:
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?
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...
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...
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?
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?
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.
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...
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...
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 ###############...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.