-   Linux - Software (
-   -   Need help for Windows cmd commands into Linux terminal commands. (

windowsNilo 06-30-2008 08:15 PM

Need help for Windows cmd commands into Linux terminal commands.
Hi there, Im new to linux and
I understand that the terminal
is the same as the command
prompt of windows. Correct me
if I am wrong please.
I used to create batch files for
compiling certain java programs
that I do in windows. Can
anyone help me translate this
batch file into something
for linux? What is the
equivalent of batch files
for windows in Linux?
Here is the code:
@echo off
cd c:\Documents and Settings\.....
set path=%path%;C:\j2sdk1.4.0\bin
javac *
java Sample
Id really appreciate for any help
guys. Thank you.

weibullguy 06-30-2008 08:58 PM

The equivalent of batch files in *nix are shell scripts. You are probably using the Bourne Again SHell (Bash), so you might be interested in

The Bash shell equivalent (untested of course) of your batch file would be:

cd $HOME/javastuff
export PATH=$PATH:/opt/jdk/bin
javac *
java Sample

After you write it, then set it executable with chmod +x

reddazz 07-02-2008 06:26 PM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

All times are GMT -5. The time now is 01:45 AM.