![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Shell
早起的菜鸟wzt
这个作者很懒,什么都没留下…
展开
-
Shell 脚本模板常用
#!/bin/bash#----------------------------------------------------------------------------# Purpose :# Author :# Date :# Usage :# Sample :#---------------------------------------------------------------------------BASE_DIR=$(cd "`dirname原创 2021-07-12 17:19:48 · 104 阅读 · 0 评论 -
Shell 获取文件时间,修改文件时间
##获取文件时间ctime,atime,mtime %x Time of last access, human-readable %X Time of last access, seconds since Epoch %y Time of last modification, human-readable %Y Time of last modification, seconds since Epoch %z Time of last change, human-re原创 2021-07-12 17:10:30 · 3970 阅读 · 0 评论 -
shell mutt发邮件
1 定义邮件函数FunEmail(){ echo -e $* | mutt -e "my_hdr From:test@qq.com" -e 'set content_type="text/html"' -s "[Error]" ${mail_list}}email_txt=' Hi All,<br><br><font color=blue>这里可以使用html的元素</font>'#调用函数FunEmail $email_txt2 直接调用原创 2021-07-12 17:00:48 · 209 阅读 · 0 评论 -
Shell getopt 解析命令行参数
在执行脚本时,通过传入参数的方法,赋予变量值。run_type=$(echo $* | grep "-" | wc -l)if [ $run_type -ge 1 ]; then ARGS=`getopt -o L:B:T:F:S: --long LAYER:,BAT_TS:,TABLE:,FILE_LIST:,SOURCE: -- "$@"` if [ $? -ne 0 ] ; then echo "$USAGE_STR" exit 1 ; fi eval set -- "$AR原创 2021-07-12 16:49:09 · 259 阅读 · 0 评论 -
Shell 多线程并发运行脚本
Shell 多线程并发运行脚本初始化线程池## @TODO: Initial thread pool## @IN: null## @OUT: nullfunction THREAD_INT { FIFO_FILE=${BASE_DIR}/Initial_pool.fifo [[ -e "$FIFO_FILE" ]] && rm -f "$FIFO_FILE" mkfifo "$FIFO_FILE" exec 6<> "$FIFO_FILE原创 2021-07-12 16:33:57 · 509 阅读 · 0 评论