#! /bin/bash # # maria_delete.sh # # Jul/29/2023 # # -------------------------------------------------------------------------- # work_file="/tmp/tmp0082157.txt" # echo "*** 開始 ***" id_in=$1 # echo $id_in # echo "use city;" > $work_file echo "delete from cities where ID = '"$id_in"';" >> $work_file # cat $work_file mariadb --defaults-extra-file=mysql-dbaccess.cnf < $work_file # rm -f $work_file echo "*** 終了 ***" # --------------------------------------------------------------------------