StartOSW. sh:./OSWatcher. sh:/bin/ksh: bad interpreter: Perm

Source: Internet
Author: User

StartOSW. sh:./OSWatcher. sh:/bin/ksh: bad interpreter: Permission denied solution 1 view oswatcher_restart.sh content [root @ xxdb0402 dbscripts] # more oswatcher_restart.sh #! /Bin/ksh # export oswdir = 'df | grep mysqllog | awk {'print $6} ''export oswdir =/mysqllog # th = 'ps-ef | grep-v $ $ | grep OSWatcher. sh' # echo $ th; if ['ps-ef | grep-v grep | grep OSWatcher. sh | wc-l '= "0"] then cd $ oswdir/osw echo "begin 1" sh startOSW. sh 60 216 error after else echo "OSWatcher is running" fiexit 2 run [root @ xxdb0402 dbscripts] # bash-x oswatcher_restart.sh + export oswdir =/mysqllog + ps -Ef ++ grep-v grep ++ grep OSWatcher. sh ++ wc-l + '['0 = 0']' + cd/mysqllog/osw + echo 'in in 1' begin 1 + sh startOSW. sh 60 216 + exit [root @ xxdb0402 dbscripts] # startOSW. sh :. /OSWatcher. sh:/bin/ksh: bad interpreter: Permission denied solution 1. reinstall ksh and report the same error. 2. Execute sh startOSW directly. sh 60 216 also reported the same error 3 file format. I copied the file from prod to the local pc, and then copied it from the local pc to test the linux environment, I deleted the sh file, directly installed vim on the prod, copied the text, and pasted it to the test linux environment. The same error was reported after execution. Finally, I tried to set the first line of the file content startOSW. sh and startOSW. sh #! /Bin/ksh: delete the reference and execute bash-x oswatcher_restart.sh. OK. The/bin/ksh: bad interpreter: Permission denied error will no longer be reported.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.