escaping variables

This commit is contained in:
Djan 2022-07-30 17:04:56 +02:00
parent d5a7055f85
commit 84cfd59231

View File

@ -165,7 +165,7 @@ function bobainfolast {
if [ "$TestBorgErr" = "1" ]; then return;fi if [ "$TestBorgErr" = "1" ]; then return;fi
archive=$(borg list --short ./ | tail -n 1) archive=$(borg list --short ./ | tail -n 1)
borg info .::$archive borg info .::"$archive"
} }
function bobainfotail { function bobainfotail {
@ -278,7 +278,7 @@ function bobamount {
mountpoint="$HOME/borg_$1" mountpoint="$HOME/borg_$1"
mkdir $mountpoint mkdir $mountpoint
echo "Archive : $1" echo "Archive : $1"
borg mount ./::$1 $mountpoint borg mount ./::"$1" $mountpoint
read -p "Presser une touche pour démontage" CONT read -p "Presser une touche pour démontage" CONT
UnMount UnMount
} }
@ -289,8 +289,8 @@ function bobamountfirst {
archive=$(borg list ./ --short | head -n 1) archive=$(borg list ./ --short | head -n 1)
mountpoint="$HOME/borg_$archive" mountpoint="$HOME/borg_$archive"
mkdir $mountpoint mkdir "$mountpoint"
borg mount ./::$archive $mountpoint borg mount ./::"$archive" "$mountpoint"
read -p "Presser une touche pour démontage" CONT read -p "Presser une touche pour démontage" CONT
UnMount UnMount
@ -300,10 +300,10 @@ function bobamountlast {
TestBorgRepo TestBorgRepo
if [ "$TestBorgErr" = "1" ]; then return;fi if [ "$TestBorgErr" = "1" ]; then return;fi
archive=$(borg list ./ --short | tail -n 1) archive="$(borg list ./ --short | tail -n 1)"
mountpoint="$HOME/borg_$archive" mountpoint="$HOME/borg_$archive"
mkdir $mountpoint mkdir "$mountpoint"
borg mount ./::$archive $mountpoint borg mount ./::"$archive" "$mountpoint"
read -p "Presser une touche pour démontage" CONT read -p "Presser une touche pour démontage" CONT
UnMount UnMount
@ -333,7 +333,7 @@ function bobasearchinarchive {
TestBorgRepo TestBorgRepo
if [ "$TestBorgErr" = "1" ]; then return;fi if [ "$TestBorgErr" = "1" ]; then return;fi
borg list --short .::$1 | grep -i $2 borg list --short .::"$1" | grep -i "$2"
} }