Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #!/bin/sh
  2. while IFS=" " read LITRAGE FLOW T1 T2 ;
  3.  
  4. do echo $LITRAGE $FLOW $T1 $T2;
  5.  
  6.  
  7. mysql -u admin-um -pdrums um-jekeha << EOF
  8. use um-jekeha;
  9. INSERT INTO main
  10. (date, litrage, flow, t-hot, t-cold)
  11. VALUES
  12. (TIMESTAMP(CURRENT_TIMESTAMP), $LITRAGE, $FLOW, $T1, $T2)
  13. EOF
  14.  
  15. done < ./log
  16. exit 0
  17.  
  18. iam@workstation:~/projecto/um/soft$ sh base1.sh
  19. 11.50 0.70 24.33 25.33
  20. ERROR 1064 (42000) at line 2: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-hot, t-cold)
  21. VALUES
  22. )' at line 2URRENT_TIMESTAMP), 11.50, 0.70, 24.33, 25.33
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement