Last active
August 3, 2018 07:14
-
-
Save shaobin0604/c462e80c3879d1721e680cc05ab088a9 to your computer and use it in GitHub Desktop.
shell 字符串处理
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file_name="com.wlqq.phantom.plugin.ymm.cargo_1.5.15.apk" | |
base_name=${file_name/.apk/} | |
package_name=`echo $base_name | cut -d"_" -f 1` | |
version_name=`echo $base_name | cut -d"_" -f 2` | |
echo $package_name # com.wlqq.phantom.plugin.ymm.cargo | |
echo $version_name # 1.5.15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment