Hello everyone I have the following code. bat and I would like to convert it. sh, someone could help me? Thank you.

1) for /F "eol=#" %%i in (%wade-cfg%/boot.properties) do (
set %%i
)

2) for %%F in (%lib%/*.jar) do (
set class-path=!class-path!%lib%/%%~nxF;
)

3) for /f "tokens=*" %%G in ('dir /b /A') DO (
if exist %addons%/%%G/cfg set class-path=!class-path!%addons%/%%G/cfg;
)

sh and bash have for loops, conditionals etc, so the process of converting something short like this is to understand it, then rewrite it in (ba)sh. From your linux command line, chant info bash or man bash . From a system that has a "real" sh (as opposed to using a stripped down bash, as linux does); chant man sh . There are examples of sh programs in the /etc directory, and other places.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.