bash:strings:find_replace
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
bash:strings:find_replace [2021/02/10 15:59] – peter | bash:strings:find_replace [2021/02/10 16:04] (current) – peter | ||
---|---|---|---|
Line 34: | Line 34: | ||
---- | ---- | ||
+ | ===== Changing contents within a file ===== | ||
+ | |||
+ | <code bash> | ||
+ | contents=$(< | ||
+ | $ echo " | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * **infile.txt**: | ||
+ | * **$old**: | ||
+ | * **$new**: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | To change the file in-place: | ||
+ | |||
+ | <code bash> | ||
+ | echo " | ||
+ | </ | ||
bash/strings/find_replace.1612972756.txt.gz · Last modified: 2021/02/10 15:59 by peter