This past week I worked on a bash script to create some input files from a MySQL database. My problem was trying to use multiple line MySQL statements, which was messing everything up. The solution was to use bash’s Here Documents. It’s a way to direct lines into a command. For me, the command looked like this: mysql DBNAME <<EOF… Read more →