我想在bash脚本中运行一些Heroku命令。我知道这完全不对,应该学习一下bash,但以下是我想实现的内容。
# get the database url and assign it to a variable
URL=heroku config:get DATABASE_URL -a wt2-production
# insert the variable in another command
heroku pg:copy URL DATABASE_URL --app my-staging-app
我该如何在bash脚本中实现这个功能?