星期一, 七月 09, 2007

Some tips when migrating ksh+java program from Windows to UNIX

1. When transfering .jar and .class file, remember to use binary transfer

2. The delimiter of classpaths is ":" in UNIX, while in Windows it was ";"

3. UNIX doesn't allow empty line in .ksh file, while it is OK in windows

4. When calling a .ksh file, such as "sh test.ksh", in UNIX, remember to follow this ".ksh" subfix, while in windows, it can be "sh test" (I haven't tried if it can have ".ksh" in windows)

5. For a while statement, in Windows, it can use "while do"("do" begins a new line), nothing between while and do, to make a Infinite Loop, but we should change it to "while true do". (we tried while [1] do, but failed.)  (There's expression "while [ condition ]; do", but we didn't try, coz get the solution before trying it. If something happens to while statement, u may try to add a ";" before "do")

6. UNIX script uses [] for most parameters, when use it, remember to insert a space between the [] and the parameter in it (You can refer to the UNIX SHELL man exported: www.research.att.com/~gsf/man/man1/ksh.html )

没有评论: