gpt4 book ai didi

linux - 在 bash 中运行多个进程

转载 作者:太空宇宙 更新时间:2023-11-04 12:51:26 25 4
gpt4 key购买 nike

我想为以下场景编写一个 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com