3 Replies Latest reply on Nov 13, 2012 8:12 PM by bigdelboy

    script not running in bash, only runs when shell is set to ksh

      I have the following script that do not run on bash:

      for dir in directory1/subdirectory /directory2/subdirectory
      echo "$dir $( du $dir |wc -l)"
      done > ./message1
      mailx -s "number of files" fretagi@mcel.co.mz < ./message1

      But this script runs if I set shell to be ksh. I try to change the first line to #!/bin/bash, but the script does not work.

      Any hints