Linux file warehouse receiving script

Source: Internet
Author: User
Linux file warehouse receiving script-linux file warehouse receiving script #! /Bin/bash # Input parameter time in the format of yyyymmdd. if this parameter is not input, use if [$ {#1}-eq6] on the previous day of the system. thenday $1 elseday $ (date-d & quot; + % Y % m) fiif [$ {#1}-eq... linux file warehouse receiving script-linux file warehouse receiving script #! /Bin/bash # Input parameter time in the format of yyyymmdd. if this parameter is not input, use if [$ {#1}-eq 6] on the previous day of the system. then day = $1 else day = $ (date-d "" + % Y % m) fi if [$ {#1}-eq 6]; then day1 = $2 else day1 = $ (date-d "1 month ago" + % Y % m) fi source/home/oracle /. bash_profile file_name =/oradata/org_data/ftp_down/itv/login/itv_login.ctl echo "load data"> $ file_name ls/oradata/org_data/ftp_down/itv/login/| grep "$ day "| while read-a line do echo" INFILE \ "/oradata/org_data/ftp_down/itv/login/$ {line [0]} \" \ "str '\ r \ n' \ "" >>$ file_name done echo "into table ITV_LOGIN_M" >>$ file_name echo "APPEND" >>$ file_name echo "fields terminated by '|'">> $ file_name echo "trailing nullcols"> $ file_name echo "(" >>$ file_name echo "WIDTHID, ">>$ file_name echo" USERID, ">>$ file_name echo" CREATEDATE, ">>$ file_name echo" LOGINTIMES, ">>$ file_name echo" VIEWMINUTS, ">>$ file_name echo" LEIXING, ">>$ file_name echo" month constant "$ day1" >>$ file_name echo ") ">>$ file_name sqlldr userid = username/passwd control = $ file_name log =/oradata/org_data/ftp_down/itv/login/log/itvlogin _ $ day. log errors = 600000000 direct = Y

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.