linux - 如何在 linux-shell 中使用 `amp;` 和 `gt;` 命令?

标签 linux bash shell command

我从 Internet 下载了一个 Bash 脚本。 但是,当我尝试运行它时,它因 && 命令而失败并打印以下错误消息:

No command 'amp' found

什么是 amp ? 什么是 gt ? 他们做什么?

最佳答案

我怀疑这已经过 HTML 实体转换。你想扭转这个,例如

& becomes &

> becomes >

所以(例如)

cd /dir && ls > filename

会变成

cd /dir && ls > filename

关于linux - 如何在 linux-shell 中使用 `amp;` 和 `gt;` 命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23013352/

相关文章:

linux - 如何打印文件中的出现次数?

python - 如何在 RedHat 上安装 numpy 和 matplotlib?

linux - Debian 8. 加载 iwlwifi 失败

linux - 在 64 位 Linux 操作系统上运行的 32 位进程的内存限制

bash - Synology diskstation bash 脚本 : delete old files (leave only 10 newest files)

bash - 我如何从 unix 中的给定日期获取最后一个星期日日期

linux - 将代码从一个文件复制到另一个文件的命令

linux - Bash 脚本对文件进行排序,然后转储到文件中

bash - 管道 docker run 容器 ID 到 docker exec

php - 登录服务器的sftp脚本