Rice internships-use of shell scripts and Python script records

Source: Internet
Author: User
Tags python script
Shell:
Log_date= ' date-d "1 day Ago" +%y-%m-%d ' #以指定格式设置一天前的年份月份日期aws S3 ls $LAST 5_base_path > ${tmp_file} #将s3这个位置的文件清单输出到tmp . txt files if grep-q $LOG _date $TMP _file; Then #查找是否存在spark-submit--master "local[*]"/root/downloads/packagestat/selecttopnapppackage.py $TEST _1 $TEST _2 $ Android_output_base_path $IOS _output_base_path #提交py文件加输入参数

Python:
Eval function: Convert the string "{Key:value}" to a dictionary
Datetime.strptime (date_string, format): Converts a format string to a DateTime object
Time.strftime (FMT): Returns a custom formatted string. Example: Time.strftime ("%y%m%d-%h:%m:%s")

Rice internships-use of shell scripts and Python script records

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.