Unix Shell script vs Java


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Unix Shell script vs Java
# 1  
Old 08-10-2007
Unix Shell script vs Java

Members,
I been faced with an issue where i have to sale my project against JAVA.would like to know more on the strong point of shell script (bash shell) over java.I have a very limited knowledge on java.is there anyone who has worked on java and shell scripting in both and really been able to find out the dicrepencies from both the sides.
We will be using the oracle 10g as database but the no of interactions with database is not very frequent.
need urgent reply from you unix gurus.
thanks in advance.Smilie
# 2  
Old 08-10-2007
Is there anyone who can help me out.Please.Smilie
# 3  
Old 08-10-2007
Quote:
Originally Posted by navojit dutta
Members,
would like to know more on the strong point of shell script (bash shell) over java.
Aren't you aware you are actually trying to compare apples and oranges?

Shell script and Java are two very different kinds of languages for different purposes. I know Java pretty well and I have written shell scripts of moderate complexity in the past. But my impression so far is I never need to make a choice between the two as they are so different that a use case for Java will hardly ever fit at all for shell script, and vice versa. (Have you heard about using Java for Unix shell scripting to replace sed, grep etc.?)
# 4  
Old 08-11-2007
true...but i have make a choice and that to quickly....main reason my project has both java as well as unix ppl involved.The work can be done both ways....but i want to know exactly what aspects of shell programming will make anything messy , that can be easily done by java,i want to know about the performance issue when you talk about database interactions,exception handlings and speed of execution of both this....do you ppl think that shell script will have a back log in this aspects?
# 5  
Old 08-11-2007
Quote:
Originally Posted by navojit dutta
main reason my project has both java as well as unix ppl involved.The work can be done both ways
I agree with cbkihong. I think normally, it is not an either or choice - that java would be used for things that are better in java and shell for things that are better in shell. Since you have both java and unix people involved, I suggest you ask them about the trade offs. I don't know how much we can help with out a better understanding of the details.

Java's main selling point is portability. Shell's main selling point is the ability to easily put together a wide array of pre-built tools.

Last edited by kahuna; 08-11-2007 at 08:24 AM..
# 6  
Old 08-11-2007
Here is another way to think about it...

When the thing is production will the second level support people be Java programmers or system administrators?

What are the bits that are likely to need changing/configuring on an on going basis, and which are the fundamental building blocks that won't change?
# 7  
Old 08-11-2007
true...guys...let me tell u a bit detail...its still in devolopment fron...when in production there will not be a constraint from the point who will be supporting it....

which will be better according to you guys in terms of database interactions....unix has sqlplus.....but does unix have exception handling that java does with ease.....?

In an ongoing basis its mostly that the files going to be increasing as the project deals mostly roams around file handlings and constant database interactions.

will unix shell script able to maintane its performance?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Script Shell in java code

Hello, This is my script shell: echo Mon premier script echo Liste des fichiers : ls -la exit 0 This is my code java: public class test { public static void main(String args) { try { Process process = Runtime.getRuntime().exec("sh script1.sh"); } catch... (2 Replies)
Discussion started by: chercheur857
2 Replies

2. Shell Programming and Scripting

how to execute a unix shell script from a java program

Hi All, well , i am facing this problem.. i have tried a few sample codes but there isn't any solution . could anyone please give a sample code as of how to do this... Please see the below details...and read the details carefully. I have written some code, logic is 1)from... (4 Replies)
Discussion started by: aish11
4 Replies

3. Shell Programming and Scripting

Calling Java Method from UNIX using shell script

Hi All, I need to call a java method from a shell script. I know we can use the command java ClassName to call the main method in it. But I need to call another method that is there in the class and pass an email to it. Can I use java ClassName.MethodName(email) Any help will be... (4 Replies)
Discussion started by: RahulK
4 Replies

4. UNIX for Advanced & Expert Users

run shell script in java?

hi, how to run shell script in java? i have script a.sh which takes 1 argument as input and returns exit code integer. how to handle it in java. should i have to invoke process to execute it and then wait til it completes ? please explain with code thanks (1 Reply)
Discussion started by: crackthehit007
1 Replies

5. Shell Programming and Scripting

Running shell script from java

Hello All, Hope all is well. I was trying to scratch my head here with simple problem of running Shell script in Java. I tried to google and look through forums but was unable to understand how to solve it. Here is my simple Java class, which resides in different directory then my shell... (2 Replies)
Discussion started by: samshaw
2 Replies

6. UNIX for Dummies Questions & Answers

Java or C for creating a unix shell?

Hi, Great to find this forum! I'm a complete newbie to unix, and am having a hard time finding my way around. Firstly, I've been reading something about c shell programming being one tenth the size of c programming done on unix.....I couldn't figure what that meant, but there were two... (7 Replies)
Discussion started by: sdsd
7 Replies

7. Shell Programming and Scripting

How to call Java by using shell script

Hi All, I am new to shell script, just wanted you guy to help. How do i call a java program by using shell script, pls give some samle code for it, thank you ver much. (2 Replies)
Discussion started by: aaabbb123123
2 Replies

8. Shell Programming and Scripting

Opening a UNIX shell in Java

Hi, I need to simulate the machine's native shell (sh), for that I open up a UNIX shell in my Java program. My code works fine with windows shell ('cmd') but with unix ('sh') I failed to retrieve the machine's prompt. I believe that the issue is unix-related and that the process I launched has... (2 Replies)
Discussion started by: guyi
2 Replies

9. Programming

exit status running java classpath in unix shell

I have a java classpath running inside of a unix shell script. During my testing it will error with lines that show an example like this below. java.io.FileNotFoundException error at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:129), ... (2 Replies)
Discussion started by: mmcds
2 Replies

10. Shell Programming and Scripting

Running Shell Script from Java

Hi How can I call a .sh (shell script) from a java procedure? Is this possible at all? Please tell me. Thanks. Asty (3 Replies)
Discussion started by: Asty
3 Replies
Login or Register to Ask a Question