Skip to content
Advertisement

parsing complex string using shell script

I’m trying the whole day to find a good way for parsing some strings with a shell script. the strings are used as calling parameter for some applications.

they looks like:

JavaScript

I’m only allowed to use shell-script. I tried to use some sed and cut commands but nothing works fine.

My tries are like:

JavaScript

that return the correct value of prog but for the value of arg I couldn’t find a good way to get it. the info parameter is optional also it may be left. may any one have a good idea that can solve this problem? many thanks in advance

Advertisement

Answer

eval

JavaScript
Advertisement