请教 用什么命令可以得到文件里面的版本号?
有一个info.plist 文件 如下
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>BRPL</string>
<key>eShortVersionString</key>
<string>1.0.30309.0</string>
<key>CFBundleVersion</key>
<string>1.0.30309.0</string>
<key>IFMajorVersion</key>
<integer>1</integer>
<key>Version</key>
<string>1.0.30309.0</string>
<key>WebPluginDescription</key>
<string>1.0.30309.0</string>
</dict>
</plist>
请教高手,用什么命令可以得到这个版本号 30309.0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>BRPL</string>
<key>eShortVersionString</key>
<string>1.0.30309.0</string>
<key>CFBundleVersion</key>
<string>1.0.30309.0</string>
<key>IFMajorVersion</key>
<integer>1</integer>
<key>Version</key>
<string>1.0.30309.0</string>
<key>WebPluginDescription</key>
<string>1.0.30309.0</string>
</dict>
</plist>
请教高手,用什么命令可以得到这个版本号 30309.0
作者: debaosong 发布时间: 2011-04-18
sed -n '/eShort/{n;s#[^0-9.]##g;p;}'
作者: lululau 发布时间: 2011-04-19