小编Nie*_*els的帖子

未检测到结束 EOF

我有以下功能;

function getdetails {
    if ! "${PSQL_PATH}" -d "$DB" -U "$DB_USER" -h localhost -p "$DB_PORT" -t -c  | while read -a Record ; do
        taskid="${Record[0]}"
        clientname="${Record[1]}"
        backup_pass="${Record[2]}"
        backup_dir="${Record[3]}"
      done; then
            echo "Could not fech next task metadata from database"
            exit 1
      fi <<EOF
        WITH firsttask AS (SELECT taskid from tasks 
                            WHERE status = 'PENDING'
                            ORDER BY date_started ASC
                            LIMIT 1)
        SELECT taskid, username, storage_password AS backup_password, location AS backup_dir 
        FROM firsttask 
        INNER JOIN users USING (userid)
        INNER JOIN storage USING …
Run Code Online (Sandbox Code Playgroud)

bash eof psql

0
推荐指数
1
解决办法
3183
查看次数

标签 统计

bash ×1

eof ×1

psql ×1