#!/bin/bash -l
path=`find $(pwd) -name *.ipa`
echo ${path}
It is also possible to write the following
path=$(find $(pwd) -name *.ipa)
As shown in the figure, there is an .ipa file under the Export folder, and we currently want to obtain the absolute path of the .ipa file
The execution results are as follows
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$