gunzip BkDat_elm-29-06-2015.tar.gz 
tar xvf BkDat_elm-29-06-2015.tar 
cat BkDat_elm-29-06-2015 |psql
psql
cd ../elm/
ls -l
su
ls -l
gunzip BkDat_elm-01-08-2015.tar.gz 
mc
tar xvf BkDat_elm-01-08-2015.tar 
cat BkDat_elm-01-08-2015 | psql elm
psql
pwd
mc
su
ls -l
cat BkDat_elm-23-08-2015 | psql elm
psql
cd ../elm/
crontab -l
mc
crontab crontab_elm 
crontab -l
crontab crontab_elm 
crontab -l
chmod +x backup1.sh 
ls -l
./backup1.sh 
man ncftpput 
mc
./backup1.sh 
psql elm
cat cargo_contrapart.sh 
psql
mc -e cargo_contrapart.sh 
psql
mc -e cargo_contrapart.sh 
./cargo_contrapart.sh 
psql
cd ../elm
mc
./cargo_contrapart.sh 
mc -e cargo_contrapart.sh 
./cargo_contrapart.sh 
mc
./cheques_usados.sh 01-01-2012 31-03-2015
./cheques_usados.sh 01-04-2015 30-04-2015
./cheques_usados.sh 01-05-2015 31-05-2015
./cheques_usados.sh 01-06-2015 30-06-2015
mc -e cheques_usados.sh 
./cheques_usados.sh 31-03-2015 01-01-2012
./cheques_usados.sh 30-04-2015 01-04-2015
./cheques_usados.sh 31-05-2015 01-05-2015
./cheques_usados.sh 30-06-2015 01-06-2015
./cheques_usados.sh 31-07-2015 01-07-2015
psql
./cheques_usados.sh 31-08-2015 01-08-2015
./cheques_usados.sh 30-09-2015 01-09-2015
./cheques_usados.sh 30-11-2015 01-10-2015
./cheques_usados.sh 31-08-2015 01-08-2015
cd /opt/www/html/www.lopezmelnyk.com/siste/contab/asientos/
mc
ls -l
su estlm
psql
su
./crones/backup.sh
cd /home/elm/
./crones/backup.sh
cd /home/elm/crones/
crontab -l
./backup1.sh 
echo "">fab
cd ../elm/
./cheques_usados.sh 01-08-2015 31-08-2015
mc -e cheques_usados.sh 
./cheques_usados.sh 31-08-2015 01-08-2016
./cheques_usados.sh 30-09-2015 01-09-2016
./cheques_usados.sh 31-10-2015 01-10-2016
./cheques_usados.sh 30-11-2015 01-11-2016
./cheques_usados.sh 31-07-2016 01-12-2016
mc -e cheques_usados.sh 
cat cheques_usados.sh 
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-07-2016') group by 1,2 order by 1;"
select * from ptovta;
psql -c "select * from ptovta;"
psql -c "select ptv_id,ptv_codigo from ptovta;"
psql -c "select ptv_id,ptv_codigo,ptv_nombre from ptovta;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-07-2016') group by 1,2 order by 1;"
psql -c "select  date_part('month',fecvalastc(chq_idastoc)),date_part('Y',fecvalastc(chq_idastoc)),ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-07-2016') group by 1,2,3,4 order by 2,1;"
psql -c "select  date_part('month',fecvalastc(chq_idastoc)),date_part('Y',fecvalastc(chq_idastoc)),ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-07-2016') and chq_idptov=4  group by 1,2,3,4 order by 2,1;"
psql -c "select  date_part('month',fecvalastc(chq_idastoc)),date_part('Y',fecvalastc(chq_idastoc)),ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-07-2016') and ptovdeastc(chq_idastoce)=4  group by 1,2,3,4 order by 2,1;"
psql -c "select  date_part('month',fecvalastc(chq_idastoc)),date_part('Y',fecvalastc(chq_idastoc)),ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-07-2016') group by 1,2,3,4 order by 2,1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-07-2016') group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2005') and date_le(fecvalastc(chq_idastoc),'31-07-2015') group by 1,2 order by 1;"
psql
mc
cat fab |psql elm
psql
mc -e fab
psql
mc -e fab
cat fab |psql elm
mc -e fab
psql
cd ../elm/
./cheques_usados.sh 31-07-2015 01-01-2012
./cheques_usados.sh 31-07-2016 01-07-2015
./cheques_usados.sh 31-07-2016 01-08-2015
mc -e cheques_usados.sh 
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2005') and date_le(fecvalastc(chq_idastoc),'31-07-2015') group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-07-2016') group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-08-2015') group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-09-2015') and date_le(fecvalastc(chq_idastoc),'30-09-2015') group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-07-2016') group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-07-2016') and ptovdeastc(chq_idastoc)=4 and ptovdeastc(chq_idastoce)=5 group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-12-2015') and ptovdeastc(chq_idastoc)=4 and ptovdeastc(chq_idastoce)=5 group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-01-2016') and date_le(fecvalastc(chq_idastoc),'31-01-2016') and ptovdeastc(chq_idastoc)=4 and ptovdeastc(chq_idastoce)=5 group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-02-2016') and date_le(fecvalastc(chq_idastoc),'31-03-2016') and ptovdeastc(chq_idastoc)=4 and ptovdeastc(chq_idastoce)=5 group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-04-2016') and date_le(fecvalastc(chq_idastoc),'31-07-2016') and ptovdeastc(chq_idastoc)=4 and ptovdeastc(chq_idastoce)=5 group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-07-2016') and date_le(fecvalastc(chq_idastoc),'31-07-2016') and ptovdeastc(chq_idastoc)=4 and ptovdeastc(chq_idastoce)=5 group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-06-2016') and date_le(fecvalastc(chq_idastoc),'30-06-2016') and ptovdeastc(chq_idastoc)=4 and ptovdeastc(chq_idastoce)=5 group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-06-2016') and date_le(fecvalastc(chq_idastoc),'30-06-2016') and ptovdeastc(chq_idastoc)=4 and ptovdeastc(chq_idastoce)=5 and chq_estado<100 group by 1,2 order by 1;"
psql -c "select  ptovdeastc(chq_idastoc),ptovdeastc(chq_idastoce),sum(chq_importe) from cheques where chq_idptov!=ptovdeastc(chq_idastoce) and date_ge(fecvalastc(chq_idastoc),'01-08-2015') and date_le(fecvalastc(chq_idastoc),'31-07-2016') and chq_estado<100 group by 1,2 order by 1;"
./cheques_usados.sh 31-07-2016 01-08-2015
./cheques_usados.sh 31-08-2015 01-08-2015
./cheques_usados.sh 30-09-2015 01-09-2015
./cheques_usados.sh 31-10-2015 01-10-2015
./cheques_usados.sh 30-11-2015 01-11-2015
./cheques_usados.sh 31-12-2015 01-12-2015
./cheques_usados.sh 31-01-2016 01-01-2016
./cheques_usados.sh 29-02-2016 01-02-2016
./cheques_usados.sh 31-03-2016 01-03-2016
./cheques_usados.sh 30-04-2016 01-04-2016
./cheques_usados.sh 31-05-2016 01-05-2016
./cheques_usados.sh 30-06-2016 01-06-2016
./cheques_usados.sh 31-07-2016 01-07-2016
cd ../elm
mc
psql elm
mc
./cargo_contrapart.sh 
psql elm
mc
./cargo_contrapart.sh 
cd /opt/www/html/www.lopezmelnyk.com/elm/contab/
mc
cd asientos/
ls -l
su estlm
./backup1.sh
cd /home/elm/crones/
./backup1.sh
aws configure
cd /home/elm/crones/bk/
aws s3 cp BkDat_elm-04.tar.gz s3://catware/elm/
cd /home/elm/crones/
mc
./backup1.sh 
cd ..
cd elm
mc
cd /opt/www/html/www.lopezmelnyk.com/siste/contab/asientos/
ls -l
su estlm
cd /home/elm/
mc
psql zonab
cd /home/elm/crones/
mc
crontab crontab_elm 
mc
./backup.sh 
mc
