Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash replace specific line in file

# Basic syntax:
sed '<row_number>s/.*/<replacement_text>/' your_file
# Where:
#	- The row_number is the row your want to replace with the
#		replacement_text
#	- .* means match anything on that row (so it can be replaced)
 
PREVIOUS NEXT
Tagged: #bash #replace #specific #line #file
ADD COMMENT
Topic
Name
8+4 =