path_to_str: simplify code

This commit is contained in:
Jérémy Lecour 2024-01-09 11:22:18 +01:00 committed by Jérémy Lecour
parent f3e25a7beb
commit 2b4333bded
Signed by: jlecour
SSH key fingerprint: SHA256:h+5LgHRKwN9lS0SsdVR5yZPeFlJE4Mt+8UtL4CcP8dY

View file

@ -137,8 +137,5 @@ send_mail() {
}
path_to_str() {
local path=$1
local str="${path}"
echo "${path}" | sed -e 's|^/||; s|/$||; s|/|:|g'
echo "${1}" | sed -e 's|^/||; s|/$||; s|/|:|g'
}