pom.xmlがあります。
<scm>
<developerConnection>scm:git:ssh://[email protected]:anton_patsev/maven-release-example3.git</developerConnection>
<tag>HEAD</tag>
</scm>
文字列を取得する方法[Eメール保護]:pom.xmlのanton_patsev/maven-release-example3.git?
ありがとうございます!
ベストアンサー1
string=$(cat pom.xml | grep developerConnection | sed -e s/\<developerConnection\>scm:git:ssh://g)
echo string
echo $string
developerConnection=$(echo ${string//[[:blank:]]/} | cut -c 3- | sed s/developerConnection//g | head -c-4)
echo developerConnection
developerConnection=$(echo $developerConnection| sed 's/gitlab.tools.russianpost.ru\//gitlab.tools.russianpost.ru:/g')
echo developerConnection