0

I have the following code on my bash script:

#!/bin/bash

# vars
BACKUP_DIR= /opt/odoo12/database_backup_test

# create a backup directory
mkdir -p -v "${BACKUP_DIR}"

When the script is executed, the following err shows up:

mkdir: cannot create directory ‘’: No such file or directory
0

1 Answer 1

2

You have a space in your variable assignment that makes it an empty variable, change it to:

BACKUP_DIR=/opt/odoo12/database_backup_test
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .