16 lines
375 B
Bash
16 lines
375 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
LIST_FILENAME="$1"
|
||
|
|
||
|
if [ ! -f "${LIST_FILENAME}" ]
|
||
|
then
|
||
|
echo "The file [ \"${LIST_FILENAME}\" ] doesn't exits"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
stat load-domains-list.sql && rm -vf load-domains-list.sql
|
||
|
|
||
|
cat load-domains-list.sql.in |sed -e "s@###FILENAME###@${LIST_FILENAME}@g" > load-domains-list.sql
|
||
|
|
||
|
mariadb -u root --local-infile < load-domains-list.sql
|