In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
File name: comment.sh
Path: $HOME/ggscript/ggcomment
Function: the script is designed based on the database monthly large number of annotated source tables for data cleaning, requiring data synchronization with a large number of annotated configuration tables.
Select and call through the edit script
Log path: $HOME/gglog/ggcomment
#! / bin/bashbackuptime= `date +% Y% m% dmurf% H% M`echo "This script is used to annotate the specified table! (created by renyi)" echo $backuptime >''$HOME'/gglog/ggcomment/InsertLog-'$backuptime'.log'read-n process "enter the filename of the E process that requires batch comments (at the end of prm) ls-lrt $HOME/ggserver/dirprm/e*.prmread-p" Please enter the prm file name: "val# enter the table name you need to comment Do not add TABLE and semicolon echo "Please Enter the table you need to annotate" read-n 1vi annotmpecho "--annotate table -" >''$HOME'/gglog/ggcomment/annoLog-'$backuptime'.log'cat annotmp > >'$HOME'/gglog/ggcomment/annoLog-'$backuptime'.log'# backup prm configuration file 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/annoLog-'$backuptime'.log'# Select operation type echo checho" Operating table you want to belong to what state? "select ch in" parameter "" noparameter "" REPLICAT "" exit "do# all need to be annotated table with parameter case $ch in" parameter ") sed's / ^ / TABLE / 'annotmp > table1 sed's account / / 'table1 > table2break ;; # all tables need to be annotated without the parameter "noparameter") sed's / ^ / TABLE / 'annotmp > table1 sed's' table1 > table2break;;; "exit") echo "process break" exit 2 politics *) echo "Please select your choice:" 1.parameter "2.noparameter"exit"; esacdone Echo $TALi=1num= `sed-n'$= 'table2` # Annotation Operation while ["$I"-le "$num"] do TAL= `sed-n $iSecretp`table2` # echo $TAL # echo-- $TAL sed "s/$TAL/--$TAL/g" $HOME/ggserver/dirprm/$val > tmp2 cat tmp2 > $HOME/ggserver/dirprm/$val ((iTable2`)); done echo "process complete" > >' $HOME'/gglog/ggcomment/annoLog-'$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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.