awk和sed 取 info.plist 里面的版本号
来源:互联网 发布:淘宝满就包邮怎么设置 编辑:程序博客网 时间:2024/06/07 03:32
#获取 info.plist 文件的版本号
shotBundlRow=$(awk '/CFBundleShortVersionString/ {getline; print}' $infoPlistFilePath)
currentVersion=$(echo "$shotBundlRow" | sed -ne's/<string>\(.*\)<\/string>/\1/p')
currentVersion=$(echo "$currentVersion" | sed's/^[[:space:]]*//')
echo "currentVersion=$currentVersion"
currentBundlRow=$(awk '/CFBundleVersion/ {getline; print}' $infoPlistFilePath)
currentVersionCode=$(echo "$currentBundlRow" | sed -ne's/<string>\(.*\)<\/string>/\1/p')
currentVersionCode=$(echo "$currentVersionCode" | sed's/^[[:space:]]*//')
echo currentVersionCode=$currentVersionCode
先是找到 CFBundleShortVersionString 这一行,然后把下一行的内容取出来,然后再取出版本号
0 0
- awk和sed 取 info.plist 里面的版本号
- 取info.plist版本号等内容
- Supporting Files里面的Info.plist
- 获取info.plist当中版本号
- iOS从info.plist 获取项目的名称及版本号
- iOS从info.plist 获取项目的名称及版本号
- iOS从info.plist 获取项目的名称及版本号
- iOS从info.plist 获取项目的名称及版本号
- iOS从info.plist获取项目的名称及版本号
- 读取系统版本信息 info.plist里面的信息
- Info.plist和pch文件的作用
- sed 和 awk的使用
- Linux的sed和awk
- iOS 的info.plist
- info.plist的功能
- IOS info.plist文件里面添加描述
- Info.plist 和 pch 文件
- 在Xcode中info.plist里面增添定位和网络图片获取
- delphi 版 sqlHelper第一版
- delphi 版 sqlHelper第二版
- 【转】.Net 托管代码和非托管代码的区别
- C#调用C++ DLL的方式
- Javascript面向对象编程
- awk和sed 取 info.plist 里面的版本号
- 进度条
- 奥米拉品牌面膜
- Nodejs express、html5实现拖拽上传
- 子父列表读取 (续)
- 图像金字塔
- 使用python编写批量卸载android应用的脚本
- 工欲善其事,必先利其器-ecplise配置和优化
- XMemcached 中文api