Replace a line in a file with SED
sed -i 'Ns/.*/replacement-line/' file.txt
where N
should be replaced by your target line number. This replaces the line in the original file. To save the changed text in a different file, drop the -i
option:
sed 'Ns/.*/replacement-line/' file.txt > new_file.txt
Powershell + Replace user’s manager Supermicro IPMI + Reset password
Comments are currently closed.