I'm stuck in a script. I try to expose you to see if you can help me.
I define the following before entering the loop.
client, date, time, state, name, result, most_repeated = sys.argv [1] .split ()
timestamp = str (date) + '' + '' + str (time)
CUSTOMER 08-01-2018 08:44:00 1 Test1 ALERT 4000 192.168.1.113 == > > 8.8.8.8:53 == > > DNS
The execution is as follows:
./script.py "CLIENTE 08-01-2018 08:44:00 1 nombre de la alerta que sea 5000 192.168.1.113 ==>> 8.8.8.8:53 ==>> DNS"
By putting spaces between the parameters this takes them as different parameters as we all know.
I want it:
specifically the fields
./script.py "CLIENTE 08-01-2018 08:44:00 1 nombre de la alerta que sea 5000 192.168.1.113 ==>> 8.8.8.8:53 ==>> DNS"
I took it as a single parameter.
I've been formatting it with "% s" But when more words come out in the name of the alert it will not work.
Greetings and thanks in advance.