Forum Discussion

kailas_pathade_'s avatar
kailas_pathade_
Icon for Nimbostratus rankNimbostratus
Jul 10, 2018

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))

 

No RepliesBe the first to reply