![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell
sssstars
这个作者很懒,什么都没留下…
展开
-
shell删除包含某个字符串的上下几行
今天在工作中遇到了一个问题,因为网站有些链接已经是404了,所以需要从sitemap文件中去除。 但是sitemap文件有很多,而且被删除的 URL中关键词 也会有很多,删除的还是含有关键词行的上下多行。 #!/bin/sh for s in `cat sitemaplist.txt`;do #sitemap文件列表 for k in `cat keywords.txt`;原创 2017-09-25 18:34:10 · 4263 阅读 · 0 评论 -
Linux定时任务
crontab -r #删除所有任务 crontab -l #列出当前的定时任务 crontab -e #编辑crontab内容 #打开后编辑的格式,每行是一条命令 * * * * * sh a.sh #分钟 小时 日期 月份 周 命令 # * 代表任何时刻都接受的意思 # , 代表分隔时段的意思 # - 代表一段时...原创 2019-04-18 14:43:38 · 546 阅读 · 0 评论