This sed command will append / to the end of every line in filename.txt which doesn’t already have one.
sed -i '/\/$/!s/$/\//g' filename.txt
This sed command will append / to the end of every line in filename.txt which doesn’t already have one.
sed -i '/\/$/!s/$/\//g' filename.txt