Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. awk '{
  2. cmd="(mysql --host='abc' --user='def' --password='..' --database='ghf' -sNe "select VALUE from table where KEY='171-125';")"
  3. cmd|getline $lastdiff;
  4. print "diff is "lastdiff;
  5. }'
  6.  
  7.  
  8. diff is
  9.  
  10. diff is
  11.  
  12. mysql --host='abc' --user='def' --password='..' --database='ghf' -sNe "select VALUE from table where KEY='171-125';"
  13. 1
  14.  
  15. cmd=$(mysql --host='abc' --user='def' --password='..' --database='ghf' -sNe "select VALUE from table where KEY='171-125';")
  16. awk -v cmd=$cmd '{ some awk script }'
  17.  
  18. awk '{ some awk script }' <<< $cmd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement