Bash Shell Scripts


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Bash Shell Scripts
# 1  
Old 08-26-2004
Bash Shell Scripts

Hi all,

plz can anybody tell me that if a script written for Bash shell also work for other shells and if yes , how ???


Thanks and Regards

SONAL
# 2  
Old 08-26-2004
no, the syntax is different across different shell scripting languages.

sh scripts will work with bash however.
# 3  
Old 08-27-2004
Other than just syntax differnce, bash shell also supports some added UNIX commands that are not part of sh shell. Using these commands may make your program useless on sh shell.

However, you can use common syntax and commands to make your program compatible for both the shells.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Usage of #!/bin/sh vs #!/bin/bash shell scripts?

Some question about the usage of shell scripts: 1.) Are the commands of the base shell scripts a subset of bash commands? 2.) Assume I got a long, long script WITHOUT the first line. How can I find out if the script was originally designed für "sh" or "bash"? 3.) How can I check a given... (3 Replies)
Discussion started by: pstein
3 Replies

2. Shell Programming and Scripting

Difference between kshell and bash shell scripts Example cited

Hi All, I need some urgent help regarding some info. I have a cluster of servers for which I have two scripts for management. control.sh is a bash script meant for restarting/stopping the servers. manger.ksh is a kshell script. It is a master script to manage restarting/stoppping and... (3 Replies)
Discussion started by: ankur328
3 Replies

3. Homework & Coursework Questions

Bash shell scripts

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Test that exactly one command line argrument is enter from the command line. If not, display the usage... (1 Reply)
Discussion started by: jcoop12
1 Replies

4. UNIX for Dummies Questions & Answers

Repetitive scripts within a bash shell

I have a bash shell that even though it does not look pretty is working very well. Some of the steps are repetitive, something like this: muscle -in ${e}.4 > $e.5 read -t1 sed ':a /^>/!N;s/\n\(\)/\1/;ta' $e.5 > $e.6 read -t2 awk '/>/{fr=$3;getline;n=split ($0,a,""); for (i=1;i<=n;i++)... (2 Replies)
Discussion started by: Xterra
2 Replies

5. Shell Programming and Scripting

Paid job for bash shell scripts

Job ad removed (1 Reply)
Discussion started by: starmation
1 Replies

6. Shell Programming and Scripting

Writing Bash shell scripts corresponding to windows bat files

Experts, I am newbie in shell scripting. I want to write Bash shell scripts corresponding to windows bat files. I have installed cygwin at c:\cygwin and i am trying to crate the sh file using vi editor. i am not able to understand how to use linux/unix convention for the code. following is my... (15 Replies)
Discussion started by: rajuchacha007
15 Replies

7. Shell Programming and Scripting

Create Bash shell scripts corresponding to windows bat files

Experts, I am newbie in shell scripting. I want to write Bash shell scripts corresponding to windows bat files. I have installed cygwin at c:\cygwin and i am trying to crate the sh file using vi editor. i am not able to understand how to use linux/unix convention for the code. following is my... (1 Reply)
Discussion started by: rajuchacha007
1 Replies

8. Shell Programming and Scripting

best way for removing comment from shell scripts -- bash

Again a comment removal requirement from me, refer my previous problem & solution for removing comment from ruby scripts: https://www.unix.com/shell-programming-scripting/118296-best-way-removing-comment-ruby-program.html This time, it is for stripping of comments from Shell Script. I search for... (2 Replies)
Discussion started by: thegeek
2 Replies

9. Shell Programming and Scripting

Changing the Bash Scripts to Bourne Scripts:URGENT

Hi, I have to write a program to compute the checksums of files ./script.sh I wrote the program using bash and it took me forever since I am a beginner but it works very well. I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Discussion started by: pgarg1989
3 Replies
Login or Register to Ask a Question