Category Archives: sed – one liners

add / (common slash) suffix at end of each line in a text file

This will add the common slash / at the end of each line in the text file and save it. If you want just to see the result use ‘ -e ‘ instead of ‘ -i ‘.
sed -i "s/.*/&\//" filename

Advertisements