In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Path: $HOME/ggscript/ggrepeat
Function: this script is designed to deal with the problem of data duplication on the target side due to the repeated configuration of the source table on the source side. You can check the repeatedly configured table name for the process and list the specific information and the number of file lines
Can cooperate with note quick comment script to clean up repetitive tables on the source side.
#! / bin/bashecho "+-+" echo "| This script will search for the repeat table (by RenYi) |" echo "+-- -+ "if [$#-eq 0] Then echo "REPEAT EXTRACT" exit 2fibackuptimetime = `date +% Y% m% dcombe% H% M`datenow = `date +% Y% m% d% H`val = $1vale = `echo $val | tr Amurz AZ-Z`echo "-" echo "The process name is $val" echo "-" val= `echo $val.PRM | tr Ashaz-z`c $HOME/ggserver/dirprmif [!-e $val] Then echo "the EXTRACT is not exist" exit 2ficd $HOME/ggscript/ggrepeatcat $HOME/ggserver/dirprm/$val | awk'/ TABLE#/,/#TABLE/ {if (I > 1) print xtincture (I > 1) tempawk-F'- -'($1) {print $1} 'temp > temp2rm-rf tempsed-e' / ^ $/ d 'temp2 > temp3rm-rf temp2awk-F','{print $1} 'temp3 > temp4rm-rf temp3awk-F' '' {print $1} 'temp4 > temp5rm-rf temp4cat temp5 | awk-F' TABLE''{print $2}'> Temprm-rf temp5sort Temp | uniq-d > $HOME/ggscript/ggrepeat/tmpecho "-" echo "The repeat table:" echo "-" cat tmpi=1num= `sed-n'$= 'tmp`echo "num= $num" echo "-" echo "The Detailed results:" echo "-" while [!-n "$num"] do echo "no result" exit 2donewhile ["$I"-le "$num"] do TAL= `sed-n $ifolp`tmp` echo $TAL Grep-ni $TAL $HOME/ggserver/dirprm/$val ((iTunes +)) Doneecho "-"
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.