Ad Widget

Collapse

use brackets inside system.run?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bbrendon
    Senior Member
    • Sep 2005
    • 870

    #1

    use brackets inside system.run?

    Is this possible, I thought it was . Or maybe the functionality was removed ?
    Unofficial Zabbix Expert
    Blog, Corporate Site
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hi,

    Maybe you should escape those special characters (brackets, quotes etc.)? I don't remember the full list which needed to be escaped but maybe that is your case.

    Is it possible that you share the exact example command here?

    Best Regards,
    Ingus

    Comment

    • bbrendon
      Senior Member
      • Sep 2005
      • 870

      #3
      I was trying to use sed. Something like: sed s/([0-9]+)//

      I tried escaping and quoting and still get the syntax error message from the gui.
      Unofficial Zabbix Expert
      Blog, Corporate Site

      Comment

      • bbrendon
        Senior Member
        • Sep 2005
        • 870

        #4
        Damn... wasted a bunch of time on this. I had an existing system.run with this. All I had to do was look through my old templates.

        Works:
        system.run["curl ...|sed 's/[^0-9]*//g'"]

        Doesn't work:
        system.run[curl ...|sed "'s/[^0-9]*//g'"]
        Unofficial Zabbix Expert
        Blog, Corporate Site

        Comment

        Working...