linux - 在 bash 中运行多个进程

标签 linux bash

我想为以下场景编写一个 bash 脚本:

nc -lvvp 1334
./c_file

c_file 创建到 netcat 监听器的反向连接。问题是当我运行这个 bash 文件时,只有 netcat 监听器启动。 c_file 未执行。有人能告诉我如何正确实现吗?

我已经尝试了在后台运行该进程的 & 命令,但它不起作用。这些必须在同一个文件中。

最佳答案

# run the netcat in the background as
nc -lvvp 1334 &

关于linux - 在 bash 中运行多个进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37058584/

相关文章:

c++ - 如何设置 Makefile 以使用 Visual-Studio 风格的输出目录进行构建?

linux - Sed 对流数据的操作

java - 编写 bash 或其他脚本以重新启动另一个脚本

linux - SSH session 中的“ip addr”,私有(private)地址和公共(public)地址

linux - 拦截输入设备发送的数据

linux - 如何在 sed shell 命令中使用数组?

linux - 如何在 Linux 中获得内存修改通知

c# - Linux 上带有 .NET 核心的 Roslyn : How can I load an external project?

bash - 从 shell 脚本运行 Golang 脚本

html - 使用 shell 脚本发送 HTML 邮件