I start by saying I am very new on shell script so please don't shoot me !! :)
I have a file that contains the following text:
1 : /
2 : /string-1/
4 : /string-2/
5 : /string-3/
and I like to remove the end slashes of the strings so the result should be like that :
1 : /
2 : string-1
4 : string-2
5 : string-3
I have try that by using the sed as following:
local_export_folder="/home/merianos/Documents/repositories/DatabaseBackup/tmp"
sed -i -e 's/\/([^\/]+)\//\1/' ${local_export_folder}/blogs.csv
but this doesn't work.
Am I doing anything wrong ?