Sed Shell - Replace an entire line number with a string

Revision as of 11:58, 20 September 2019 by Ardaut (talk | changes) (Created page with "<pre>sed -i 'Ns/.*/replace-line-with-this-string/' file.txt</pre> in ''N'' you enter the line number. Please add your string in "''replace-line-with-this-string''". Catego...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
sed -i 'Ns/.*/replace-line-with-this-string/' file.txt

in N you enter the line number. Please add your string in "replace-line-with-this-string".[[Category: Shell