#!/bin/bash
if [ "$1" = "boot" ]
then
if [ -f /var/log/boot.log ]
then
echo /var/log/boot.log
elif [ -f /var/log/boot ]
then
echo /var/log/boot
fi
fi
Run Code Online (Sandbox Code Playgroud)
这显示了输出:
: command not foundline 8: GetLogfileName.sh: line 15: syntax error
near unexpected token `elif' 'etLogfileName.sh: line 15: `
elif [ -f /var/log/boot ]
Run Code Online (Sandbox Code Playgroud)
这里出了什么问题?
在Linux(Ubuntu 11.04)上,出于某种原因,Python脚本(特别是Django的manage.py,但我认为不重要)最近开始表现得很奇怪:
当运行时
python manage.py
Run Code Online (Sandbox Code Playgroud)
它运行得很好; 然而,有了
./manage.py
Run Code Online (Sandbox Code Playgroud)
它显示以下错误:
: No such file or directory
Run Code Online (Sandbox Code Playgroud)
该文件的权限是766.任何想法?