From TRS-80, 2 Months ago, written in Bash.
  1. mapfile -td '' unreconciled < <(gawk -v var="$descrip_match" -v ORS='\0' '$0 ~ var' RS= "$beanfile")
  2. for i in "${unreconciled[@]}"
  3. do
  4.     echo "$i"
  5.     # get check date from Beancount transaction and store it in a variable
  6.     check_date=$(echo $i | tr -d '\0' | cut -c-10)
  7.     echo "Check date is: $check_date"
  8.     printf "PDF file will be %s_check_stub.pdf" "$check_date"
  9.     printf "\n"
  10. done
  11.  
captcha