终端-找不到命令 [英] Terminal - command not found

查看:179
本文介绍了终端-找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习编写Shell脚本并使用终端机.

I'm trying to learn to write shell scripts and use the Terminal.

在Users/user/Development/linux中,我有一个名为sysinfo_page的脚本.

In Users/user/Development/linux I've got a script called sysinfo_page.

所以我在终端的linux文件夹中,当我键入ls命令时可以看到sysinfo_page.

So I'm in the linux folder in the terminal and I can see the sysinfo_page when I type the ls command.

但是,当我输入以下命令时:

However, when I enter the following command:

sysinfo_page > sysinfo_page.html

我收到以下消息:

-bash:sysinfo_page:找不到命令

-bash: sysinfo_page: command not found

我该如何解决?

推荐答案

如果要从当前目录运行脚本文件,则必须在脚本名称前写./:

If you want to run a script file form the current directory, you have to write ./ before your script name:

./script.sh

这篇关于终端-找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆