#!/bin/bash cd $1 pwd cat *_diff_sql > merge_sc_update.sql wc -l merge_sc_update.sql awk '1;NR%2000==0{print "SELECT SLEEP(1);"}' merge_sc_update.sql > todo_diffnsc.sql wc -l todo_diffnsc.sql grep SELECT todo_diffnsc.sql | wc -l ~