Posts by Samuel Fagundes de Oliveira • 91 points
7 posts
- 
		3 votes1 answer414 viewsA: Mysql commands in Shell ScriptYou can try this way: mysql -u USUARIO -pSENHA NOMEBANCO -e "QUERY QUE VOCÊ QUER EXECUTAR NO MYSQL" ex: mysql -u user -psenha mysql -e "select * from user;"… 
- 
		0 votes3 answers102 viewsA: Linux - Edit multiple files using another file as sourceYou can use the xargs to accomplish the desired task, follows below an example where I list a directory and get all the files . cfg and insert a line into the found files.: ls *.cfg | xargs sed… 
- 
		1 votes2 answers4575 viewsA: How to use Sip debug in Asterisk?You can use the SNGREP to monitor direct at the terminal has a very detailed output, it is designed to monitor SIP traffic. It is a lightweight and very useful tool in everyday life, follows the… 
- 
		0 votes1 answer80 viewsA: Buy values from the listAs you have noted in your question, the comparison is being performed with string 1 and not with the integer, there is a difference between if x == '1' (compares string 1) and if x == 1 (compares… 
- 
		1 votes1 answer213 viewsA: Linux - Copy only attributes of files into a folderWhen it is necessary to copy the information of owners and groups of the file you must use the parameter -p , in your case the command to copy the files and keep the permissions would be: cp -rp… 
- 
		0 votes1 answer174 viewsA: How to generate a graph with distinct X and Y with the matplotlib module in Python?I don’t know if I understood your doubt correctly, but take a look at this solution that I created the value of Y is fixed from 0 to 10 and X is variable according to what the user type. Note: X… 
- 
		0 votes3 answers353 viewsA: How to create a accumulatorThere is the possibility that if students are inserted in a dictionary, and facilitates the consultation of who are the students failed. Follow this example below, here I limited the students up to… pythonanswered Samuel Fagundes de Oliveira 91