Hello everyone, everything good?
I need to automate my scanning using bash script with gvm-cli. For example, today I run gvm-cli commands individually, but it is becoming laborious. For example, I use the command “gvm-cli socket --xml <create_target>” to create the hosts and receive the id. Then I take the id and put it in the command “gvm-cli socket --xml <create_task>” to create the tasks and so on. As I’m resuming my studies with bash and I’m having some difficulty, could anyone help me? How can I get the id from the first command, put it in a variable and use it in the second command? Remembering that the first command returns a large string, I may need to find the term “id” to copy it.