Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
shashankkumar
New Contributor II

Change output format and update it in web server text file.

Hi Team,

 

I have output as DestIP = ['1.1.1.','1.1.1.2'] and I want to update this in a text file of server which i have integrated using SSH connector, while trying to update it is getting updated as it is ['1.1.1.','1.1.1.2'] but I want to update these mutiple IPs in text file of server in a vertical format without any brackets and commas. For example, refer below:

 

Is there any utility to change the format like this ? 

 

1.1.1.1

1.1.1.2

 

Regards,

Shashank

Shashank
Shashank
2 REPLIES 2
rosatechnocrat
Contributor II

Yeah I can provide you the utility. 

Can you share a more of sample text. 

Rosa Technocrat --

Also on YouTube---

Please do Subscribe
Rosa Technocrat --Also on YouTube---Please do Subscribe
shashankkumar

 Hi  Rosa,

 

If you see attached images, from FortiSOAR we are getting IP output in list format under "nice_ip" key and I am sending this IP to update in text file of web server which i have integrated using SSH connector and I am using command "echo -e '{{vars.nice_ip}}' >> /var/test.txt" to update. Now I want the IPs to be updated in text file as one IP per line without additional bracket or commas, but it is getting updated as ['10.67.0.254', '10.77.0.254'] in single line. 

 

==

sample:

 

"nice_ip": [
"198.224.171.135",
"198.224.169.135"
],

Shashank
Shashank
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors