Skip to main content
Uwe_Sommerfeld
New Member
January 14, 2013
Question

Variables in CLI Scripts

  • January 14, 2013
  • 4 replies
  • 6943 views
Hi all are there any usable parameters / variables in CLI scripts? Like $HOSTNAME is there a list available?

    4 replies

    csecmx
    New Member
    January 31, 2023

    I´ve tried %%host%% and %%hostname%% with no luck; I´m trying to save a timestamp-and-hostname log file script; in the meantime I´ll use %%date%% %%time%% to add the timestamp and manually add the hostname (and maybe current fortiOS version of the device at the time of the backup).

     

    Regards!

    Sam_FTNT
    Staff
    Staff
    March 30, 2023

    Hi @csecmx For CLI Script variable of the Hostname use %%devname%%.

     

     

    marconet-22
    Explorer II
    December 12, 2024

    Hi

    Where can i find variable list?

    Byron1
    New Member
    April 17, 2024

    Hi @Sam_FTNT We have some news about what's in thread?, since apparently the command "%%devname%%" fails to compile correctly. 

    JPIZZLE
    Explorer II
    July 12, 2024

    Hello, all.  I want to use system variables in my scripts, but none of the ones like %%date%%, %%hostname%%, or %%dev.id%% work.  Any word on host to grab variables like dates, hostnames, device serials, etc?