#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
my $output_dir;
my $number_base;
&Usage("Too few arguments") if $#ARGV<0;
GetOptions(
'o|out_dir=s' => \$output_dir,
'b|base=i' => \$number_base
)or &Usage("Wrong arguments");
sub Usage(){
my($msg) = @_;
print "\nUsage: perl CutBaseRead.pl -o out_fir/ -b 40
$msg!
Argument(s): -out_dir|-o -base|-b\n";
exit(1);
}
[ORACLE] [SQLSERVER] [POSTGRES] [MYSQL] [DBA] [UNIX] [LINUX] [WINDOWS] [FREEBSD] [REDHAT] [SQL] [PERL] [SH] [BAT] [SCRIPT]
Friday, August 24, 2012
Monday, August 20, 2012
Biologia - Herança Ligada ao Sexo
Biologia - Herança Ligada ao Sexo (Khan Academy)
http://www.youtube.com/watch?v=-L9jQxPZI1U&feature=related
Linux / Unix Command - [ Convert ]
Resize and convert an image in the JPEG format to PNG
$convert -resize 50% input.jpg output.jpg
Monochrome:$ convert -monochrome input.jpg output.jpg
Rotate
$ convert -rotate 90 input.jpg output.jpg
Contrast
$ convert -contrast input.jpg output.jpg
Wednesday, August 15, 2012
Mysql - Script Load Table DataBase | Shell
#!/bin/bash
DB_USER="name_user"
PASS="pass_user"
HOST="host_name"
DB="name_dateBase"
TABLE="name_table"
PATH_FOLDER=`pwd`
for file in `ls *.txt`
do
mysql -u ${DB_USER} -h ${HOST} -p -D ${DB} -e "LOAD DATA LOCAL INFILE '${PATH_FOLDER}/${file}' INTO TABLE ${TABLE} FIELDS TERMINATED BY '\t';"
done
DB_USER="name_user"
PASS="pass_user"
HOST="host_name"
DB="name_dateBase"
TABLE="name_table"
PATH_FOLDER=`pwd`
for file in `ls *.txt`
do
mysql -u ${DB_USER} -h ${HOST} -p -D ${DB} -e "LOAD DATA LOCAL INFILE '${PATH_FOLDER}/${file}' INTO TABLE ${TABLE} FIELDS TERMINATED BY '\t';"
done
Wednesday, August 8, 2012
Linux - [ Mount - Umount ] / HD EXTERNO
sudo su -l
# fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 209713151 104855552 83 Linux
/dev/sda2 209713152 226484223 8385536 82 Linux swap / Solaris
/dev/sda3 226484224 976773119 375144448 83 Linux
Device Boot Start End Blocks Id System
/dev/sdf1 1 409639 204819+ ee GPT
/dev/sdf2 409640 624880263 312235312 7 HPFS/NTFS/exFAT
# mkdir /mnt/hd_tmp
# mount -t vfat dev/sdf2 /mnt/hd_tmp/
# touch /mnt/hd_tmp/tmp.txt
# umount /mnt/hd_tmp/
# fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 209713151 104855552 83 Linux
/dev/sda2 209713152 226484223 8385536 82 Linux swap / Solaris
/dev/sda3 226484224 976773119 375144448 83 Linux
Device Boot Start End Blocks Id System
/dev/sdf1 1 409639 204819+ ee GPT
/dev/sdf2 409640 624880263 312235312 7 HPFS/NTFS/exFAT
# mkdir /mnt/hd_tmp
# mount -t vfat dev/sdf2 /mnt/hd_tmp/
# touch /mnt/hd_tmp/tmp.txt
# umount /mnt/hd_tmp/