Actions

Dev/bash

From Whonix

< Dev

Proper Whitespace Handling[edit]

#!/bin/bash

## https://yakking.branchable.com/posts/whitespace-safety/

set -e

app_user=user
lib_dir="/tmp/test/lib/program with space/something spacy"
main_app_dir="/tmp/test/home/user/folder with space/abc"
mkdir -p "$lib_dir"
mkdir -p "$main_app_dir"

declare -a cmd

cmd+=("cp")
cmd+=("-r")
cmd+=("${lib_dir}")
cmd+=("${main_app_dir}/")

"${cmd[@]}"