在shell中怎样将mysql的查询结果的字段值赋值给shell变量?
如题query.sh
1 execute_sql="
2 select sentence,translation,handle,priority
3 from friendly_arse.sentence_english
4 where handle='$1';
5 "
6 echo $execute_sql > temp.sql
7
8
9 mysql --user=peek_guy --password=sesameopendoor < temp.sql
10
如题我要将translation的字段值赋给一个shell变量然做显示,我该怎么做?
如果不能实现,有没有其他办法可以操作字段值....
感谢........