Flavours of shell?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Flavours of shell?
# 1  
Old 05-20-2009
Flavours of shell?

It's a little while since I used Linux in anger but when I did, Bourne shell (/bin/sh) was actually Bash (/bin/bash) in disguise Smilie - I had some native Solaris Bourne scripts that didn't want to work quite right on Linux. Is this still the case? Also, for similar reasons, is Korn shell on Linux the same as Korn shell on Solaris. And finally, what about Perl? For a standard Linux distro, what Perl version would be expected?
# 2  
Old 05-20-2009
Quote:
Originally Posted by JerryHone
It's a little while since I used Linux in anger but when I did, Bourne shell (/bin/sh) was actually Bash (/bin/bash) in disguise Smilie - I had some native Solaris Bourne scripts that didn't want to work quite right on Linux. Is this still the case?

There is no Bourne shell for Linux, but most Bourne scripts will run correctly. The biggest problem is the use of echo (which has incompatibilities even among different Bourne shells). You can set (or unset) an option in bash to use the same flavour of echo as is used in your Solaris scripts.

There may also be problems with different versions of external utilities.
Quote:
Also, for similar reasons, is Korn shell on Linux the same as Korn shell on Solaris.

Which version do you have on Solaris?

For portable scripts, use POSIX syntax and avoid echo.
# 3  
Old 05-20-2009
A bit of background...I work with a large legacy application that is a mix of SQL, Perl, shell, compiled C etc that's been developed and evolved over the last 10+ years Smilie ...you name it, we've got it! The question's been asked whether we could migrate from Solaris (8 at the moment but soon 10) to Linux. So, the question is not whether we could now write portable code, but how portable our existing code base is!
From cfajohnson's reply, it would seem that the answer is probably "not very"!
# 4  
Old 05-20-2009
Quote:
Originally Posted by JerryHone
So, the question is not whether we could now write portable code, but how portable our existing code base is!
From cfajohnson's reply, it would seem that the answer is probably "not very"!

You would have to examine the code and see how it was written.

If it is well written, it could be "very"; otherwise "not very".
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pass C shell array to another C shell script(csh) and shell(sh)

Dear Friends, Please help me on this my script name is send.csh In this i have written the statement like this set args = ( city state country price ) I want to pass this array to another c shell called receiver.csh. and i want to use it in this c shell or how to pass to... (2 Replies)
Discussion started by: SA_Palani
2 Replies

2. AIX

Automate ssh between different flavours of ssh

Hiya, I want to automate ssh between two servers (Server A and Server B) and currently facing two problems. I am able to automate ssh between same SSH versions but unable to do so for following conditions. 1. SSH versions are different on Server A and Server B. 2. Username is different on... (1 Reply)
Discussion started by: kamitsin
1 Replies

3. UNIX for Advanced & Expert Users

Where to download unix not unix flavours like ubuntu, redhat etc.

I checked unix.org but did not find any link where i can download basic unix flavour. any idea from where i can download unix. thanks in advance. - nilesh (14 Replies)
Discussion started by: ynilesh
14 Replies

4. Linux

How to Start a Shell as Login shell instead of ordinary shell

Hi I tried with bash --login option. but the output is siva:~$ bash --login siva:~$ is there any way to make the shell ask for user id and password ( and login as different user instead of using sudo / su ) Thx in advance Siva (3 Replies)
Discussion started by: Sivaswami
3 Replies

5. UNIX for Dummies Questions & Answers

Different flavours of Unix

Hi all, I would like to know why is there so many different kind of unix systems like IBM AIX, SUN Solaris and so on.. What are the issues that we would considering choosing a Unix system? Newbie to Unix, thus this question (2 Replies)
Discussion started by: vincente
2 Replies

6. UNIX for Dummies Questions & Answers

O S flavours ...which is which

Does anyone know how to find out what flavour of Unix "Data General" is closest too.. heres what I need to do, I need to install one of the available free flavours on my Intel Pc at home, So as I can transfer all my shell scripts over without the need for re-working them...but I have no idea how to... (0 Replies)
Discussion started by: Gerry405
0 Replies

7. Solaris

Difference b/w flavours

Hi.. I am totally confused..could anyone tell me how different is Sun version of unix different from that of HP, IBM(AIX) and other flavours. Balaji (2 Replies)
Discussion started by: balaji_prk
2 Replies

8. Shell Programming and Scripting

Differences in awk between UNIX flavours

Hi, I've been charged with the task of finding out whether the scripts which we use on our current DYNIX (Sequent) UNIX box will continue to run happily on our soon-to-be-installed Sun Solaris box. I'm fairly certain that they'll be OK, but I've heard mutterings about awk running differently... (2 Replies)
Discussion started by: pbritta
2 Replies

9. Post Here to Contact Site Administrators and Moderators

UNIX flavours

UNIX comes in the most widest and broadest of functionalities and versions. Might be a good idea to: 1. introduce some vendor specific forums: e.g. HP-UX, Linux, AIX etc. 2. create more forums directed at core functionalities: e.g.: networking (already there), LVM, 3rd party applications... (1 Reply)
Discussion started by: patvdv
1 Replies

10. UNIX for Dummies Questions & Answers

Newbie question about unix flavours

Hi, I am newbie to unix. I am been immensily impressed by this forum. I have installed sun solaris in my pc and started learning unix. The question is, If i know one unix flavour (say sun solaris) is that i can claim, i know all the unix and linux flavours. Can i be able to work on other vendor... (3 Replies)
Discussion started by: Balaji
3 Replies
Login or Register to Ask a Question