Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はシェル スクリプトの初心者です。ここに${VERSION_NUMBER}${VERSION_SUFFIX}のような文字列があります。${ VERSION_NUMBER}を 1200 などの独自の値に置き換えたいと思います。私に提案できますか?
同じことを行う方法は複数あります。
tr コマンドを使用できます。
cat file_name | tr VERSION_NUMBER REQUIRED_VERSION > resultant_file_name
ファイルを vim エディターで開きます。ファイルを挿入モードのままにして、次のコマンドを実行します。
%s/VERSION_NUMBER/REQUIRED_VERSION/g