bash:append_a_string_after_each_line
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
bash:append_a_string_after_each_line [2019/12/07 01:32] – created peter | bash:append_a_string_after_each_line [2021/01/09 13:38] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== BASH - Append a string after each line ====== | ||
- | |||
- | If your sed allows in place editing via the **-i** parameter: | ||
- | |||
- | <code bash> | ||
- | sed -e ' | ||
- | </ | ||
- | |||
- | If not, you have to make a temporary file: | ||
- | |||
- | <code bash> | ||
- | typeset TMP_FILE=$( mktemp ) | ||
- | |||
- | touch " | ||
- | cp -p filename " | ||
- | sed -e ' | ||
- | </ | ||
bash/append_a_string_after_each_line.1575682349.txt.gz · Last modified: 2020/07/15 09:30 (external edit)