Porting from solaris to linux(i.e sun command)?

Based on what you've added, I'd say that you can replace sun with false, and check the output of uname -p or uname -m instead.

I can find no mention of the sun command in the Solaris documents (either the user or system administration ones). If you mean the sum command, that should be available, or you probably want to look at cksum. It's possible your command may be a local one in which case you'll need to tell us what it's supposed to do so we can tell you the alternatives.In terms of figuring it out, you should post: the first bit of output from man sun.

The output of which sun. The first 20-odd lines from that file (assuming it's a script rather than binary file). Following your question update, it looks like you have some code that depends on the sun command return value.

That will return true on a Sun and false everywhere else. So the easiest solution is to probably just create a sun script that returns false: #! /bin/bash # # sun command on non-Sun systems exit 1 However, it's probably not going to be that simple.

Obviously there are some platform-specific things going on there that you will have to add code in for Linux. That doesn't directly affect the sun command but all the stuff that happens when sun returns 0 will have to be done for Linux as well. If you do a uname -o on Linux, you should get back "Linux" somewhere in the string (from memory).

That should be enough to identify the operating system which is probably all you need. The detection of machine and/or processor is probably not that relevant for software unless you're shipping binary executables for all platforms and selecting which ones to run dynamically.

Based on what you've added, I'd say that you can replace sun with false and check the output of uname -p or uname -m instead.

I can find no mention of the sun command in the Solaris documents (either the user or system administration ones). If you mean the sum command, that should be available, or you probably want to look at cksum.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions