Skip to content

Commit

Permalink
Add more feedback and allow for double quotes or lack there of
Browse files Browse the repository at this point in the history
  • Loading branch information
DonRichards committed Oct 25, 2023
1 parent 91c78b7 commit 16ad1ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion temp_migrate_fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ for TITLE in "${TITLES[@]}"; do

# Check if NODE_ID is numeric (meaning we found a valid node ID)
if [[ $NODE_ID =~ ^[0-9]+$ ]]; then
echo "Replace the collection_object:$TITLE with the Node ID in the file"
echo "Replace the collection_object:$TITLE with the Node ID: $NODE_ID in the file"
sed -i "s/,\"collection_object:$TITLE\",/,$NODE_ID,/g" "$FILE_PATH"
sed -i "s/,collection_object:$TITLE,/,$NODE_ID,/g" "$FILE_PATH"
else
echo "No Node ID found for title: $TITLE"
fi
Expand Down

0 comments on commit 16ad1ee

Please sign in to comment.