Bourne sh versus bash


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bourne sh versus bash
# 1  
Old 06-07-2010
Bourne sh versus bash

Hi All,

I know difference between shell(s) we are using, ie. sh, bash etc.
But while writing shell script, is there any difference which shell I am using. and if yes, what are they?
# 2  
Old 06-07-2010
This is question has been answered 2 days ago:

https://www.unix.com/shell-programmin...h-vs-bash.html
# 3  
Old 06-07-2010
on linux /bin/sh is /bin/bash
# 4  
Old 06-07-2010
Quote:
Originally Posted by bigearsbilly
on linux /bin/sh is /bin/bash
On some linux distributions it happens to be bash yes, but e.g. on Ubuntu it is a link to /bin/dash
# 5  
Old 06-08-2010
... and on Debian as well the default shell is no more bash but "Debian Almquist Shell" aka dash which is (almost) SUS compliant. It is also faster then bash.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash Vs. Bourne REGEX: metacharacters escaping

I am currently reading a very old reference from O'Reilly: Sed and Awk 2nd Edition reprinted in 2000. So far, it's a solid read and still very relevant. I'd highly recommend this to anyone. The only problem I have with this book is that I had to resort to bourne shell to get my examples to work... (3 Replies)
Discussion started by: ConcealedKnight
3 Replies

2. Shell Programming and Scripting

Confusion about FOR LOOP syntax between Bourne and BASH shell. Please see.

for (( i=1; i<=3; i++ )); do for (( j=1; j<=3; j++ )); do for (( k=1; k<=3; k++ )); do echo $i$j$k done done done Will the above code work on a BOURNE shell? As far as my understanding is, if I am writing the above code in a file..say lol.sh and then running it through the terminal using... (7 Replies)
Discussion started by: navienavnav
7 Replies

3. UNIX for Dummies Questions & Answers

Bourne-sh (not bash) question about nested loops and sed

Here's the input: alpha, numeric or alphanumeric string ("line 1 string") numeric string ("line 2 string") numeric string ("line 3 string") numeric string ("line 4 string") ... where - each numeric string is in a pattern that can be matched with RE but - there can be any number of... (2 Replies)
Discussion started by: uiop44
2 Replies

4. Shell Programming and Scripting

Bash, Bourne, and nullglob

I have a script that start out with this: #!/sbin/sh Several things run. However I cannot get: shopt -s nullglob to run in Bourne. I get: shopt: not found So within the main script (after #!/sbin/sh at the top) I start bash with: bash and try to run what I need with: shopt -s... (2 Replies)
Discussion started by: crowman
2 Replies

5. Shell Programming and Scripting

I need to understand the differences between the bash shell and the Bourne shell

I do not claim to be an expert, but I have done things with scripts that whole teams of folks have said can not be done. Of course they should have said we do not have the intestinal fortitude to git-r-done. I have been using UNIX actually HPUX since 1992. Unfortunately my old computer died and... (7 Replies)
Discussion started by: awk_sed_hello
7 Replies

6. 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

7. UNIX for Advanced & Expert Users

cpio versus cp

I am copying a file system to another one. someone suggest me use find . -print |cpio -pdmv but I think cp -r should do the same thing. Am I right? In addition, by using " find . ", I got all the file names,, why do I have to use the -print option? Thanks a lot! (1 Reply)
Discussion started by: fredao
1 Replies

8. Shell Programming and Scripting

<LF> versus <CR>/<LF>

Hello, Can someone explain how to distinguish a LF character and a CR/LF character in a text file from a shell script. Thanks (1 Reply)
Discussion started by: jerardfjay
1 Replies

9. UNIX for Dummies Questions & Answers

CTRL+H versus ^? versus BACKSPACE

Hi Gurus! I recently got my shell account (HP UX v11) created by our sysadmin and am having problem deleting with the backspace key. After doing some reading, I believe I need to enter a custom "STTY..." statement in my profile. Can someone please help me with the correct "STTY" sequence... (3 Replies)
Discussion started by: alan
3 Replies

10. Cybersecurity

AF_UNIX versus AF_INET

I'm using AF_INET in sockets for inter process communication on the same machine. Is AF_UNIX better for IPC on the same machine than AF_INET in terms of performance? If so, how much better? I would like to know if there is sample code available to test this. I'm running the program on Solaris. ... (0 Replies)
Discussion started by: ivkumar
0 Replies
Login or Register to Ask a Question