I need a variable to hold results retrieved from the database. So far this is basically what I'm trying with no success.
myvariable=$(mysql database -u $user -p $password | SELECT A, B, C FROM table_a)
My understanding of bash commands is not very good as you can see.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…