0

I am writing a script and my script is required to work both on solaris AND Linux (OpenSuse)

The script simply goes in different directories and compares some files and outputs the difference between the files in a specific manner.

Right now, I am developing it on OpenSuse(linux). Are there some good tips on how I can write/edit the script so it works on both OS?

Thank you in advance

6
  • 1
    ... and where is the script? Commented Oct 6, 2013 at 16:07
  • 2
    Paste the script here, or possible better on unix.stackexchange.com and somebody can probably tell you what won't work. There are quite a few differences in grep, find, date, for example, but often you can work around them, or install the GNU version (there's a package for that in Solaris), so you can use them the same way. Commented Oct 6, 2013 at 16:24
  • @janos Is it possible that a script works on both platform? (it's a tool that is required to work on both) Commented Oct 6, 2013 at 17:30
  • @Matin probably, but it really depends on the details of what you need to do. Commented Oct 6, 2013 at 17:37
  • This question is more about underlying tools like grep and find Commented Oct 6, 2013 at 18:58

1 Answer 1

1

Writing portable script is easy or at least should it be, just use commands specified by the POSIX standard and stick to their documented options and behavior.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.