运行bash脚本时出错

时间:2017-03-07 12:31:59

标签: bash amazon-ec2

我正在尝试运行bash脚本startup_application.sh
该脚本如下:

#!/bin/sh
vncserver
/home/ubuntu/hadoop-2.7.3-3/ctlscript.sh start

每当我尝试运行脚本时,我都会收到以下错误:

 sh '/home/ubuntu/startApplication.sh' start
    : not foundu/startApplication.sh: 2: /home/ubuntu/startApplication.sh: vncserver
    usage: /home/ubuntu/hadoop-2.7.3-3/ctlscript.sh help
           /home/ubuntu/hadoop-2.7.3-3/ctlscript.sh (start|stop|restart|status)
           /home/ubuntu/hadoop-2.7.3-3/ctlscript.sh (start|stop|restart|status) apache
           /home/ubuntu/hadoop-2.7.3-3/ctlscript.sh (start|stop|restart|status) hive_derby
           /home/ubuntu/hadoop-2.7.3-3/ctlscript.sh (start|stop|restart|status) hive_metastore
           /home/ubuntu/hadoop-2.7.3-3/ctlscript.sh (start|stop|restart|status) hive_hiveserver2
           /home/ubuntu/hadoop-2.7.3-3/ctlscript.sh (start|stop|restart|status) hive_webhcat
           /home/ubuntu/hadoop-2.7.3-3/ctlscript.sh (start|stop|restart|status) hadoop_hdfs
           /home/ubuntu/hadoop-2.7.3-3/ctlscript.sh (start|stop|restart|status) hadoop_yarn
           /home/ubuntu/hadoop-2.7.3-3/ctlscript.sh (start|stop|restart|status) hadoop_timelineserver

    help       - this screen
    start      - start the service(s)
    stop       - stop  the service(s)
    restart    - restart or start the service(s)
    status     - show the status of the service(s)

我需要做什么才能解决此问题。请建议我。谢谢。

0 个答案:

没有答案