0

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;
)

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by griswolf
0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.