runner
runner

Reputation: 601

How to invoke a bash script from xml file

I am creating a CLI using XML commands with klish as XML parser

I want to invoke a bash file from the XML specifically from the ACTION tag just as given below,

<ACTION> "bash_file_invoke_from_here" </ACTION>

I am aware that it can be done, but I don't know the exact syntax {because I am new to the XML concepts}. I could't find it from any website. Please share the websites too if available.

Upvotes: 0

Views: 4929

Answers (1)

Etan Reisner
Etan Reisner

Reputation: 81012

Looking at the examples it appears that the ACTION tag just contains literal shell scripts.

As such it looks like you should just be able to put your script there to run it.

<ACTION>/path/to/your/script.sh</ACTION>

You'll need to make sure your script is executable of course.

Upvotes: 1

Related Questions