- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Migration of scripts from HP unix to Redhat
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2010 12:21 AM
тАО08-12-2010 12:21 AM
Migration of scripts from HP unix to Redhat
I have a set of scripts which needs to be migrated from HP unix to Redhat Linux.
I was wondering if anyone has done this before and if they have a list of commands which work on HP unix but need a change on redhat linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2010 12:57 AM
тАО08-12-2010 12:57 AM
Re: Migration of scripts from HP unix to Redhat
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2010 03:29 PM
тАО08-12-2010 03:29 PM
Re: Migration of scripts from HP unix to Redhat
#!/bin/bash
...at the beginning of a shell that originates elsewhere and now is being run on a Linux system with the BASH shell will improve compatibility.
You could also try executing your scripts with the Korn shell which is available on your RedHat distro (check for /bin/ksh but you may have to add it manually if your kickstart didn't call for it). If you've added the line as suggested above, you'll either need to delete it or change the reference to /bin/ksh.
Keep in mind that any references to devices or filesystems in the script will need to be changed because these references will be different and will need to be changed. For example, a command to mount a CD-ROM in HP-UX might be:
mount /dev/dsk/c1t2d0 /cdrom
...although that can be dependent on the specific system and the controller the CD-ROM exists on. In RHEL the command would be:
mount /dev/cdrom
...because you can let it default to the directory /media/cdrom as a mountpoint, although you can specify any valid directory path you want.
Your scripts should have a high degree of portability using the recommendations above, but you should scan through them for examples of references like the CD-ROM one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2010 10:49 PM
тАО08-12-2010 10:49 PM
Re: Migration of scripts from HP unix to Redhat
So what you need to do is to scan the scripts for OS-specific commands ('bdf', for instance, is not available on Linux. And 'top' or 'df' respond in a different way. And then I haven't begun about the different behaviour of some of the LVM commands.).
What I do in most cases: create a new script on the linux environment and use the knowledge/algorithm used on the HP-UX environment. But only if it uses HP-UX specific commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2010 10:53 PM
тАО08-12-2010 10:53 PM
Re: Migration of scripts from HP unix to Redhat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-13-2010 12:00 AM
тАО08-13-2010 12:00 AM
Re: Migration of scripts from HP unix to Redhat
i always write my scripts using 'sh', the most basic shell there is, but it is available everywhere (at least hpux, solaris & linux - which matters to me).
then in the first lines detect the OS and then i set all commands and their options depending on the OS type.
then in your script, you can just call the variable which will then run the correct command for that os.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2010 02:41 AM
тАО10-18-2010 02:41 AM
Re: Migration of scripts from HP unix to Redhat
I also want to migrate my scripts from hp machine to linus machine..
Do anybody is having some document where I can find almost all the differences as I have to prepare a Valid document...:)