Posts by ARSaraiva • 7 points
4 posts
-
0
votes0
answers38
viewsQ: Wait command with PID
Hello, I am trying to automate a task and am encountering problems with PID. My code: for i in 5 10 do echo "omnetpp.ini Generated! Running." ../../bin/Castalia -c General PIDCAST=$(ps aux |grep…
shell-scriptasked ARSaraiva 7 -
-2
votes1
answer63
viewsQ: str.replace with Indexerror: list index out of range
I have the following code that returns ref_arquivo = open("Castalia-tratado.txt","r") for linha in ref_arquivo: valor = linha.split(" ") valor[2] = valor[2].replace('\n','') print (valor) if you…
-
-1
votes1
answer66
viewsQ: Split returning Indexerror
I have a file that the lines have this pattern: 0.22755189537 SN.node[0].Application SENDING BEACON # 0 0.22755189537 SN.node[0].Application Sending [Beacon] of size 105 bytes to communication layer…
-
1
votes2
answers72
viewsQ: Accountant who does not count
Hello I did the following program: #!/usr/bin/env python3 # -*- coding: utf8 -*- import datetime import os import sys ref_arquivo = open("trata.txt","r") for linha in ref_arquivo: valor =…