Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/recipe-fiddle.git
#!/bin/bash

OIFS=$IFS

IFS=','

while read line; do
  id=$(echo $line | awk '{print $1;}')
  size=${#id}
  syns=${line#$id}

  for x in $syns; do
    echo "insert into recipe.ingredient_name_synonym (ingredient_name_id, label) values ($id,'$x');";
  done

done < $1

IFS=$OIFS