Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash append to end of line in file

# Save suffixed file into a new file
sed -e 's/^/suffix/' file > file.new

# Edit file and overwrite with suffixed text
sed -i -e 's/^/suffix/' file
 
PREVIOUS NEXT
Tagged: #bash #append #line #file
ADD COMMENT
Topic
Name
3+3 =