Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters

Writing to External Datagroup files using f5 sdk

Hi All,

I want to write a line to the file in linux server using the below command. The file_content variable is having double quotes inside. It is expected to print to file. But while executing, the double quotes are removed.

I have tried the usual solutions by giving '\' before double quotes, \x22, '\"', "\"", '"', "'" all. But nothing seems to work. any idea?

mgmt = ManagementRoot("host", "XXX", "XXXXX") dgshow = mgmt.tm.util.bash.exec_cmd('run', utilCmdArgs='-c "echo {0} > /config/filestore/files_d/Common_d/data_group_d/{1}"'.format(file_content, file_name))

Rate this Question

Answers to this Question