- or download this
touch /a/b/c/d1
- or download this
mkdir -p /tmp/a/b/c
cp /a/b/c/d1 /tmp/a/b/c
# Or: rsync -a $USER@MACHINE:/a/b/c/d1 /tmp/a/b/c
- or download this
sub escape {
my ($path) = @_;
...
}
return $path;
}
- or download this
sub escape {
my ($path) = @_;
...
$new_path =~ s/\\\//\//g;
return $new_path;
}
- or download this
foreach my $dir (sort(keys(%dirs))) {
$dir = escape($dir);
...
$parent_dir = wrap_with_quotes($parent_dir);
print("rsync -a $host$abs_path /tmp/$parent_dir\n");
}
- or download this
declare -a special_chars=("!" "@" "#" "$" "%" "^" "_" "-" "=" "+" "["
+"]" "(" ")" "{" "}" "'" ":" "," "." ";" " " "\"" "<" ">")
...
fi
done
fi