Skip to content

Commit

Permalink
Modified - Script Celulares - Delted OFFSETTMP var and logic
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceHotDog committed Oct 7, 2019
1 parent 77cdeca commit de952b9
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions mariaDBDumpCSVFormat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export USER="celulares_admin"
export PWD="celuser.3135"
export N=0
export OFFSET=0
export OFFSETTMP=0

# Comenzamos el DUMP
echo "Comenzamos el proceso" >> $LOGFILE
Expand All @@ -41,9 +40,6 @@ for TBL in $(mysql -h$DBHOST -u$USER -p$PWD $DB -sN -e "SHOW TABLES;"); do
while [ $COUNTER -ne 0 ]; do
if [ $TBL = 'celulares' ]
then
let OFFSETTMP=$OFFSET
OFFSET=$OFFSETTMP

mysql -B -h$DBHOST -u$USER -p$PWD -e "SELECT nrodoc, linea, localidad_id, provincia_id FROM $TBL LIMIT 1000000 OFFSET $OFFSET;" $DB | sed "s/\"/\"\"/g;s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" | gzip > $DB'-'$DATE'-'$TBL'-'$OFFSET.csv.gz
else
let OFFSET=0
Expand Down

0 comments on commit de952b9

Please sign in to comment.