티스토리 뷰

공부

[shell] replace file (awk)

승가비 2023. 5. 15. 23:38
728x90
awk -v old="__version__ = '$VERSION'" -v new="__version__ = '$version'" '{gsub(old, new)}1' $FILE > $FILE.tmp
mv $FILE.tmp $FILE

https://github.com/seunggabi/core_python/issues/3

 

728x90

'공부' 카테고리의 다른 글

[pypi] seunggabi_core_python  (0) 2023.05.16
[sbt] sbt-assembly (fat jar)  (1) 2023.05.16
[aws] glacier `restore-object.sh`  (0) 2023.05.12
[aws] cli check version  (0) 2023.05.12
[python] chr(ord('A') + 1) == 'B'  (0) 2023.04.28
댓글