Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- awk '{
- cmd="(mysql --host='abc' --user='def' --password='..' --database='ghf' -sNe "select VALUE from table where KEY='171-125';")"
- cmd|getline $lastdiff;
- print "diff is "lastdiff;
- }'
- diff is
- diff is
- mysql --host='abc' --user='def' --password='..' --database='ghf' -sNe "select VALUE from table where KEY='171-125';"
- 1
- cmd=$(mysql --host='abc' --user='def' --password='..' --database='ghf' -sNe "select VALUE from table where KEY='171-125';")
- awk -v cmd=$cmd '{ some awk script }'
- awk '{ some awk script }' <<< $cmd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement