Answer the question
In order to leave comments, you need to log in
Parsing multiple lines in bash?
#!/bin/bash
mysql -h localhost -login -pass -Dbase -e "SELECT userID from people WHERE (login = '${LOGIN}' AND test = '${TEST}')" | while read userID; do
mysql -h localhost -login -pass -Dbase -e "DELETE from people WHERE userID = '$userID'";
done
exit
Answer the question
In order to leave comments, you need to log in
What's stopping you from writing
DELETE from people WHERE (login = '${LOGIN}' AND test = '${TEST}')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question