Forum Discussion
crosson_16669
Nimbostratus
Jan 08, 2013Read the contents of a file as a string
Since tcl [open filename] is a disabled command how do I read the contents of a stored file as a string?
I need to store several scripts and run eval against them. It makes more sense to ...
nitass
Employee
Jan 08, 2013sorry, do i misunderstand?
e.g.
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm rule myrule
ltm rule myrule {
when RULE_INIT {
log local0. "\[eval [ifile get info_hostname_ifile]\] [eval [ifile get info_hostname_ifile]]"
}
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm ifile info_hostname_ifile
ltm ifile info_hostname_ifile {
file-name info_hostname_file
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list sys file ifile info_hostname_file
sys file ifile info_hostname_file {
checksum SHA1:13:bc46a43e1e7e2fcd875eeb750872f2813896854a
create-time 2013-01-09:01:29:03
created-by admin
last-update-time 2013-01-09:01:29:03
mode 33188
revision 1
size 13
updated-by admin
}
[root@ve11a:Active:Changes Pending] config tail -f /var/log/ltm
Jan 9 01:31:41 ve11a info tmm[11170]: Rule /Common/myrule : [eval info hostname] ve11a.acme.com
Jan 9 01:31:41 ve11a info tmm1[11170]: Rule /Common/myrule : [eval info hostname] ve11a.acme.com
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects