So I was trying to write a script in an Oracle Linux server and nothing worked. To begin with, there is no double bracket as far as I can tell.

Also, the error messages I get are weird. For instance, this code :

[[ -f 'fake' ]] || { echo "There is a missing file"; } ;

Throws :

Bash : echo not found

I clearly understand the difference between the distribution and the shell you are interacting with, which makes the issue more weird.

I am a long life Centos/Ubuntu scripter so this experience has really been a bummer.

Can someone elaborate any other differences I Should be aware in this new environment?

  • 1
    It works for me. Check what shell you are running. – Michael Hampton Feb 16 '19 at 1:42
  • @MichaelHampton I'm running Bash. And also the script has a shebang with it. I'll check the version in a while. – Matias Barrios Feb 16 '19 at 2:39
  • How do you know you are running bash? – Michael Hampton Feb 16 '19 at 2:40
  • @MichaelHampton because it's my default shell.and the error itself contains "bash" – Matias Barrios Feb 16 '19 at 2:54
  • Strange, that doesn't look like a real bash error message. – Michael Hampton Feb 16 '19 at 3:23

Your Answer

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

Browse other questions tagged or ask your own question.