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

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

问题描述

我正在尝试学习编写 shell 脚本和使用终端.

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

在用户/用户/开发/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

我该如何解决这个问题?

How do I resolve this?

推荐答案

如果你想从当前目录运行一个脚本文件,你必须在你的脚本名称前写上./:

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天全站免登陆