From 0a153fb7fa0e16fee8a188135df444284b5cac22 Mon Sep 17 00:00:00 2001 From: Taksh Date: Sun, 19 Jul 2026 16:24:41 +0300 Subject: [PATCH] fix: check $1 not PID in copy_concepts_to_versioned_schema --- mimic-iv/concepts/copy_concepts_to_versioned_schema.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mimic-iv/concepts/copy_concepts_to_versioned_schema.sh b/mimic-iv/concepts/copy_concepts_to_versioned_schema.sh index df0afa8f..73c52905 100644 --- a/mimic-iv/concepts/copy_concepts_to_versioned_schema.sh +++ b/mimic-iv/concepts/copy_concepts_to_versioned_schema.sh @@ -1,11 +1,11 @@ #!/bin/bash # This script copies the concepts in the BigQuery table mimiciv_derived to mimiciv_${VERSION}_derived. -if [ -z "$$1" ]; then +if [ -z "$1" ]; then echo "Usage: $0 " exit 1 fi export SOURCE_DATASET=mimiciv_derived -export TARGET_DATASET=mimiciv_$1_derived +export TARGET_DATASET="mimiciv_${1}_derived" export PROJECT_ID=physionet-data # check if the target dataset exists @@ -19,11 +19,11 @@ if bq ls --datasets --project_id ${PROJECT_ID} | grep -q ${TARGET_DATASET}; then if [[ "${TABLE:0:2}" == '--' ]]; then continue fi - bq rm -f -q ${PROJECT_ID}:${TARGET_DATASET}.${TABLE} + bq rm -f -q "${PROJECT_ID}:${TARGET_DATASET}.${TABLE}" done else echo "Creating dataset ${PROJECT_ID}:${TARGET_DATASET}" - bq mk --dataset ${PROJECT_ID}:${TARGET_DATASET} + bq mk --dataset "${PROJECT_ID}:${TARGET_DATASET}" fi echo "Copying tables from ${SOURCE_DATASET} to ${TARGET_DATASET}." @@ -33,5 +33,5 @@ do if [[ "${TABLE:0:2}" == '--' ]]; then continue fi - bq cp -f -q ${PROJECT_ID}:${SOURCE_DATASET}.${TABLE} ${PROJECT_ID}:${TARGET_DATASET}.${TABLE} + bq cp -f -q "${PROJECT_ID}:${SOURCE_DATASET}.${TABLE}" "${PROJECT_ID}:${TARGET_DATASET}.${TABLE}" done