LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Closed Thread
  Search this Thread
Old 06-30-2008, 08:15 PM   #1
windowsNilo
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Rep: Reputation: 0
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 *Sample.java
java Sample
pause
==========================
Id really appreciate for any help
guys. Thank you.
 
Old 06-30-2008, 08:58 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
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 http://tldp.org/LDP/abs/html/abs-guide.html

The Bash shell equivalent (untested of course) of your batch file would be:
Code:
#!/bin/sh
cd $HOME/javastuff
export PATH=$PATH:/opt/jdk/bin
javac *Sample.java
java Sample
sleep
After you write it, then set it executable with chmod +x bat_to_script.sh.
 
1 members found this post helpful.
Old 07-02-2008, 06:26 PM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - General 2 07-01-2008 06:53 AM
linux terminal commands help-urgent cbalajib Linux - General 3 10-10-2007 06:45 AM
Open commands in new terminal windows nuxeon Programming 2 07-31-2007 09:34 AM
Using Terminal commands in Linux Tec1 Linux - Newbie 2 11-03-2003 01:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration