-2

I have source of batch files which i need to convert to into shell script,i have do converted most of the code but got stuck with the following code because i could'nt find any shell equivalents for it online so anyone help me in converting the batch script

batch code needed to convert:

setlocal EnableDelayedExpansion
for %%i in (..\..\..\..\res\devices\*.xml) DO set xmls=!xmls! %%i
set xmls=!xmls! ..\..\..\..\res\RuntimeCreatedParams.xml

perl ParamEnumGen.pl ParamIds %xmls%
Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89

1 Answers1

1

If

 set xmls=!xmls! ...

is concatenation operator, then for loop would translate as

for i  in ../../../../res/devices/*.xml 
do 
   xmls="$xmls $i"
done

xmls="$xmls ../../../../res/RuntimeCreatedParams.xml"
Archemar
  • 1,369
  • 11
  • 19