Same script for Solaris,Linux,AX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Same script for Solaris,Linux,AX
# 1  
Old 06-10-2013
Same script for Solaris,Linux,AX

Hi ,

I have a script which is running in Solaris.
But my requirement got changed...this script has to run in all OS like Linux,AIX.
I tried it but most of the command is not found in all these OS.
Is there any way so that i can just modify some part and run it in all OS.
# 2  
Old 06-10-2013
Post script.
# 3  
Old 06-10-2013
Put a general PATH at the beginng of the script
Code:
export PATH
PATH=/usr/xpg4/bin:/bin:/usr/bin:/usr/sbin:/sbin

so "command" is found in any of these locations.
# 4  
Old 06-11-2013
Your question is too vague. Without seeing your script there is nothing this forum can do to help you.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Porting script from Solaris to Linux

I have a script which has commands that are located in different paths on my Linux o/s than on Solaris. For example, to make uname work, I need to do it this way in Solaris: my $host= `/usr/bin/uname -n` But in Linux it is: my $host = `/bin/uname -n`I have this issue with at least 5... (8 Replies)
Discussion started by: newbie2010
8 Replies

2. Shell Programming and Scripting

ksh script migration from Solaris to Linux.

We are migrating some scripts (ksh) from Solaris 10 to Linux 2.6.32. Can someone share list of changes i need to take care for this ? Have found few of them but i am looking for a exhaustive list. Thanks. (6 Replies)
Discussion started by: Shivdatta
6 Replies

3. Shell Programming and Scripting

Script works with Linux not with Solaris

Hi I have the following script which works in Linux shell but gives issues with Sun OS Solaris 5.10, What i am trying to achieve here is we have a list of file names in list.txt file and we parse each file at a time for a particular pattern and copt next 4 lines after we hit the pattern to a... (6 Replies)
Discussion started by: Yugendra
6 Replies

4. Shell Programming and Scripting

convert script linux to solaris???

dear all how to convert my script like this Code: awk -F "," '{close(f);f=$1}{print > f".txt"}' sample.txt for using in solaris iam first in solaris so all my script in linux not alot of working in solaris thx for advice (2 Replies)
Discussion started by: zvtral
2 Replies

5. Shell Programming and Scripting

linux bash script to sun solaris

Hi guys, I seek a solution for this action for Sun solaris. find /sapmnt/${up}/global -prune -printf "%m %M %u %g %p\n" > $DAT1 The Application/Utilities in Sun Solaris are to old and cant understand "-printf". An update for Application/Utilities is exist, but not possible to implement... (6 Replies)
Discussion started by: ixibits
6 Replies

6. Shell Programming and Scripting

Script to drop oracle DB users on HP, LINUX, SOLARIS

Hi everybody, i need help from all of you. I have many users who are no more work in our Company. Some who get objects are Locked. There Many users and many Database Servers. And it'll take long for me to finished this job. That's why i need your help to provide me anyone Scripts... (2 Replies)
Discussion started by: Sonson
2 Replies

7. Shell Programming and Scripting

Solaris Script Going To Linux

I am having an issue with the following command in Linux... penguinshrimp:/lcl/apps/Tivoli/omnibus_procedure_scripts>df -bhk /lcl/apps/Tivoli/omnibus_procedure_scripts | cut -d "y" -f1 | awk '{print$5}' df: invalid option -- b Try `df --help' for more information.... (1 Reply)
Discussion started by: LRoberts
1 Replies

8. Shell Programming and Scripting

Solaris / Linux Issues with script

Hello, I run this command from a solaris box and it works just fine. It gives me the kind of output in my file I am looking for which would be for example... sb1p rdop ot2p ot3p eimp However when I do the same thing from a Linux box... ps -ef | grep nco_p_syslog | grep -v grep |... (19 Replies)
Discussion started by: LRoberts
19 Replies

9. Shell Programming and Scripting

Script works on Solaris, not on Linux

I'm in the same boat as Barbus - same exercis (https://www.unix.com/shell-programming-scripting/43609-processes-users.html) The following script works on a solaris server I have access to. It doesn't however, work on the companies Linux machine. Any idea what's up? I have very little shell... (1 Reply)
Discussion started by: Silverhood
1 Replies

10. Shell Programming and Scripting

Script works on Solaris, not on Linux

I'm in the same boat as Barbus - same exercis (https://www.unix.com/shell-programming-scripting/43609-processes-users.html) The following script works on a solaris server I have access to. It doesn't however, work on the companies Linux machine. Any idea what's up? I have very little shell... (0 Replies)
Discussion started by: Silverhood
0 Replies
Login or Register to Ask a Question