bash:append_a_string_after_each_line
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
bash:append_a_string_after_each_line [2020/07/15 09:30] – external edit 127.0.0.1 | 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.1594805433.txt.gz · Last modified: 2020/07/15 09:30 by 127.0.0.1