0

As the command NUMBER=$((${NEW_COUNT}-${OLD_COUNT})) in a shell script did work in Linux system but not work in UNIX system, how can I make a new command work the same as the above command in UNIX system?

  • 2
    What shell are you using in this "UNIX" system? – muru May 30 at 1:03
  • Type echo $0 to determine your current shell on Unix. – unxnut May 30 at 1:29
  • What Unix is the other Unix system and what shell are you using there? You have tagged your question with historical-unix, which indicates a very old implementation, i.e. not a recent version of something like AIX or Solaris. – Kusalananda May 30 at 7:21
0

Try the expr util:

NUMBER=`expr "${NEW_COUNT}" - "{$OLD_COUNT}"`

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.