shell脚本删除指定mobileprovision
由于某种原因,xcode帮我按照了几千个开发和上线证书,需要删除这部分证书:
#dir="/Users/Ethan/Library/MobileDevice/Provisioning Profiles/"
dir="/Users/Ethan/Desktop/test/" filelist=`ls "${dir}"`
#echo $filelist for filename in $filelist
do
PROFILE_FILE="${dir}${filename}"
#echo ${PROFILE_FILE}
appidname=`egrep -a -A AppIDName "${PROFILE_FILE}" | grep string | sed -e 's/<string>//' -e 's/<\/string>//' -e 's/ //'`
#echo $appidname
IdentifierPrefix=`egrep -a -A ApplicationIdentifierPrefix "${PROFILE_FILE}" | grep string | sed -e 's/<string>//' -e 's/<\/string>//' -e 's/ //'`
#echo $IdentifierPrefix first=${appidname::} if [ ${IdentifierPrefix} == "H57E834M6D" ]&&[ ${first} == "m" ]
then
rm "${PROFILE_FILE}"
fi done
shell脚本删除指定mobileprovision的更多相关文章
- shell脚本删除log日志
删除log文件简单shell脚本 经常会遇到日志把磁盘占满的情况,引起低级故障.我个人在实际工作中,尝试了如下的方法,比较简单,而且快捷有效. #!/bin/bash # /root/log_dele ...
- liunx 使用crontab定时任务+shell脚本删除tomcat日志elasticsearch日志索引
由于过多的日志很占用磁盘空间,今天经理让我写一个脚本删除多余的日志.和es索引 定时删除试根据crontab+shell脚本实现的 crontab配置目录 /var/spool/cron/ 该目录下存 ...
- shell脚本删除N天前的目录-----附linux和mac上date命令的不同
背景: 每日构建的东西.按日期放到不同的目录里. 现在天的构建放到2015-06-01里,明天的就放到2015-06-02里,依次类推.时间久了.须要一个脚本删除N天前的目录.(本例中N=7.即删除一 ...
- Linux定是调用shell脚本删除文件
编写脚本 vi delbak.sh 代码如下: #!/bin/sh location="/home/mysql/backup/" find $location -mtime +7 ...
- 大坑记录 - shell脚本删除操作
背景 jenkins执行去执行shell命令,其中引用了一些jenkins的变量,如${WORKSPACE}这种,因为每次执行jenkins比较慢,于是想复制脚本出来想本地调试一下,直接复制了脚本过来 ...
- 使用Shell脚本删除/清空日志文件
话不多少,直接上代码: #!/bin/bash workdir=("/home/Tax_Punish_Ret/log_txt") #可填写多个路径, 用空格隔开 # 查找日志文件 ...
- shell脚本杀掉指定进程下所有子进程(包括子进程的子进程)
搜索了网上好像并没有杀掉指定进程下所有子进程(包括子进程的子进程)的脚本,自己琢磨写了一版,虽说比较简单,但希望分享大家,帮助需要的人 #!/bin/sh # 递归找到进程最底层子进程并杀除. mai ...
- shell 脚本 抽取指定数量的随机学生
#!/bin/bash # #!/bin/bash # read -p '输入数' c #指定抽取的学生人数 jw=('王浩' '谢云生' '黄科杨' '何星宇' '张宸兵' '邓培林' '刘桃' ' ...
- 使用shell脚本删除30天以前的文件
#!/bin/bashlocation=/root/rmfind $location -mtime +30 -print | xargs rm -rf //-mtime是距离上一次修改时间 -prin ...
随机推荐
- LeetCode之461. Hamming Distance
------------------------------------------------------------------ AC代码: public class Solution { pub ...
- ***git自动化部署总结
在网上搜了一堆没用找到太仔细的教程,于是花费2天时间,自己研究了下.现在分享如下: 思路:利用crontab定时去去执行git pull脚本 首先,用git clone命令将中央库的代码下载到阿里云 ...
- 常见css垂直自适应布局(css解决方法)
css3的盒模型, css3中添加弹性盒模型,最新弹性盒模型是flex,之前为box <!DOCTYPE html> <html > <head> <titl ...
- 执行打的maven jar包时出现“Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes”
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for ...
- jsonp使用,spring4.x对jsonp的支持
1.Java中接口 @RequestMapping("/token/{token}") @ResponseBody public Object getUserByToken(@Pa ...
- 各大IT技术博客排行榜
cnblogs 积分排名前3000名 http://www.cnblogs.com/ 左侧有推荐博客排行 cppblog http://www.cppblog.com/AllBloggers.aspx ...
- 修改Linux系统日期与时间date clock
先设置日期 date -s 20080103 再设置时间 date -s 18:24:30 为了永久生效,需要将修改的时间写入CMOS. 查看CMOS的时间: #clock -r 将当前系统时间写到C ...
- 从零开始---控制台用c写俄罗斯方块游戏(2)
上回说到下移的问题,这篇就说一下刷新的问题 我们控制台输出一般都是一行一行的输出,所以,在输出屏幕的时候,我们一个画面闪到另一个画面的效果 我刚开始弄的是用system("CLS" ...
- android开发:深入理解View(一):从setContentView谈起
我们都知道 MVC,在Android中,这个 V 即指View,那我们今天就来探探View的究竟. 在onCreate方法中,可以调用this.setContentView(layout_id),来设 ...
- 关于 Lo、Hi、LoWord、HiWord
Cardinal 是 4 字节无符号的整型, 先看一个例数: Cardinal 例数: 4277991664 按字节划分: 第四字节 第三字节 第二字节 第一字节 二进制: 11111110 1111 ...