スクリプトに文字列変数x=tmp/variable/custom-sqr-sample/test/example
があります。やりたいのは、すべての「-」を/に置き換えることです。その後、次の文字列を取得する必要があります。
x=tmp/variable/custom/sqr/sample/test/example
誰か助けてもらえますか?
次の構文を試しましたが、機能しませんでした
exa=tmp/variable/custom-sqr-sample/test/example
exa=$(echo $exa|sed 's/-///g')