Posts by Black Coral • 35 points
5 posts
-
0
votes0
answers16
viewsQ: Script not getting STDOUT from subprocess
Problem Well, basically I have this Python script that calls the CMD through the subprocess and writes a command in the CMD, however, I cannot print the STDOUT of the command I tried to execute…
pythonasked Black Coral 35 -
1
votes0
answers26
viewsQ: Decode accents at subprocess shell output
I’m executing the command say through the Python subprocess but it returns me the output of the command without the accents. Code import subprocess response = subprocess.check_output('dir',…
pythonasked Black Coral 35 -
0
votes2
answers33
viewsQ: Check whether a variable created through exec() exists
Good evening, create an excerpt from a script that performs the creation of a variable through exec(), however, how can I verify that the variable exists through a for in range? # criando a…
-
1
votes1
answer167
viewsQ: Add bash output to text
Well, I’m trying to create a text log, with the days and times my script was executed. Only, for example: when I use echo 10/03 - 13:20 >> log.txt it overwrites there in the text file by…
-
1
votes1
answer43
viewsQ: Problem with case in script
Someone explains me why my script is only returning the "Error option"? #!/bin/bash #==========================# DATA=$(date +%T) #Vai mostrar a hora com os mins CORTE=$(date +%k) #Vai mostrar…