0
0
1
116
664
Als
5
1
779
14.0
Normal
0
false
false
false
PT-BR
JA
X-NONE
...
Friday, September 28, 2012
Tuesday, September 25, 2012
Perl [ Generate executables from Perl / Binary file]
File Hello.pl
---------------------------------------------
#!/usr/bin/perluse strict;use warnings;print "Hei man !!! \n";
---------------------------------------------
[root@localhost Desktop]# perlcc -o Hello Hello.pl
[root@localhost Desktop]# chmod +x Hello
[root@localhost Desktop]# ./HelloHei man !!! [root@localhost Desktop]# less Hello"Hello" may be a binary file. See it anyw...
Wednesday, September 19, 2012
Install [ Oracle 11g XE on Red Hat ]
#rpm -i oracle-xe-11.2.0-1.0.x86_64.rpm Executing post-install steps...You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.[root@localhost Disk1]# /etc/init.d/oracle-xe configureOracle Database 11g Express Edition Configuration-------------------------------------------------This will configure on-boot properties of Oracle Database 11g Express Edition. ...
Tuesday, September 18, 2012
Linux - Sudoers file
Login redhat
[redhat@localhost ~]$ sudo su -l
redhat is not in the sudoers file. This incident will be reported.
[redhat@localhost ~]$
Login root
vim /etc/sudoers
root ALL=(ALL) ALL
redhat ALL=(ALL) ALL
Login redhat
[redhat@localhost ~]$ sudo su -l
[sudo] password for redhat:
[root@localhost ...
Friday, September 14, 2012
Wednesday, September 12, 2012
Perl - [ Create | Insert - DB Oracle ]
use strict;
use warnings;
use DBD::Oracle qw(:ora_types);
use DBI;
use constant SqlOracle => 'C:\oraclexe\app\oracle\product\10.2.0\server\BIN\sqlplus.exe\\';
use constant User => 'system';
use constant Pass => '12345';
use constant DB => 'XE';
print "Test Show Valeu : $0\n";
my $dbh = DBI->connect("dbi:Oracle:".DB,User,Pass) or die $!;
my $CreateTable = "CREATE TABLE EMPREGADO...
Perl - [ Perl DBI Oracle connect from Windows ]
use strict;
use warnings;
use DBD::Oracle qw(:ora_types);
use DBI;
use constant SqlOracle => 'C:\oraclexe\app\oracle\product\10.2.0\server\BIN\sqlplus.exe\\';
use constant User => 'system';
use constant Pass => '12345';
use constant DB => 'XE';
print "Create connection Oracle Database 10g Express Edition ... 1\n";
my $dbh = DBI->connect("dbi:Oracle:".DB,User,Pass) or die $!;
print...
Tuesday, September 11, 2012
Command Line, linux, Mac, perl
Perl - USE [ Copy | Move | Constant ]
#!/usr/bin/perl
use strict;
use warnings;
use File::Copy;
use constant WORK=>'/Users/als/';
copy(WORK."tmp.txt",WORK."tmp.txt.copy") or die "Copy failed $!";
move(WORK."tmp.txt",WORK."Desktop/tmp.txt") or die "Move failed $!";
print "Print constant\t:",WORK;
...
Monday, September 10, 2012
Command Line, linux, Mac, perl, Unix
Perl [ Net::FTP ]
#!/usr/bin/perl
use strict;
use warnings;
use Net::FTP;
my $ftp = Net::FTP->new("ftp.suse.com", Debug => 0, Timeout => 3) or die "Cannot connect to ftp.suse.com: $@";
if ( $ftp->login('anonymous','')){
my @dirs = $ftp->dir();
foreach my $dir (@dirs){
my ($permission,$number1,$user,$group,$number2,$months,$day,$year,$name_path)...