#!/bin/bash -l
path=`find $(pwd) -name *.ipa`
echo ${path}
写成下面这样也是可以的
path=$(find $(pwd) -name *.ipa)
如图所示,Export 文件夹下有.ipa文件,我们目前想获取.ipa文件的绝对路径
执行结果如下
192:Jenkins liubo$ cd /Users/liubo/Desktop/Jenkins/Export
192:Export liubo$ sh /Users/liubo/Desktop/kk_副本.sh
/Users/liubo/Desktop/Jenkins/Export/ThePaperBase_20230619-22-29-34_IPA/ThePaperBase.ipa
192:Export liubo$