In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
File name: recomment.sh
Path: $HOME/ggscript/ggcomment
Function: this script is used to cancel comments in batches, and it is used with batch comment scripts. The basic function is opposite, and the operation procedure is exactly the same. Select to use through the edit script
Log path: $HOME/gglog/ggcomment
#! / bin/bashbackuptime= `date +% Y% m% dvalecho% H% M`echo "This script is used to reannotate the specified table! (created by renyi)" echo $backuptime >''$HOME'/gglog/ggcomment/reannoLog-'$backuptime'.log'read-n 1ls-lrt $HOME/ggserver/dirprm/*.prmread-p "Please enter the prm file name:" valecho "Please Enter the table you need to reannotate" read-n 1vi annotmpecho "--reannotate table -" >'$HOME'/gglog / ggcomment/reannoLog-'$backuptime'.log'cat annotmp > >'$HOME'/gglog/ggcomment/annoLog-'$backuptime'.log'cp $HOME/ggserver/dirprm/$val $HOME/ggserver/dirprm/bak/$val.$backuptime.bakecho "backup the'$val' to the'$HOME/ggserver/dirprm/bak/$val.$backuptime.bak'" >'$HOME'/gglog/ggcomment/reannoLog-'$backuptime'.log'echo checho "Operating table you want to belong to what state?" select ch in "parameter"noparameter" "REPLICAT"exit" docase $ch in "parameter") sed's / ^ / TABLE / 'annotmp > table1 sed's Compact accounts / / 'table1 > table2break ; "noparameter") sed's / ^ / TABLE / 'annotmp > table1 sed's sed' table1 > table2break;;; "REPLICAT") sed's / ^ / MAP / 'annotmp > table1 sed's MAP' table1 > table2break;;; "exit") echo "process complete" break *) echo "Please select your choice:" 1.parameter "2.noparameter"3.REPLICAT"exit";; esacdone;echo $TALi=1num= `sed-n'$= 'table2`while ["$I"-le "$num"] do TAL= `sed-n $ifolp`table2` echo $TAL echo-- $TAL sed "s/--$TAL/$TAL/g" $HOME/ggserver/dirprm/$val > tmp2 cat tmp2 > $HOME/ggserver/dirprm/$val ((iTable+)) Done echo "process complete" > >'$HOME'/gglog/ggcomment/reannoLog-'$backuptime'.log'
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.