我的bash脚本读入一些变量,然后在我的家庭网络上运行airodump.我想保持窗口与airodump运行并打开一些新的终端运行其他命令进行网络发现,同时airodump屏幕打开(所以我可以看到结果).
现在我看起来像这样(编辑简洁):
#!/bin/bash
read -p "Enter the channel: $channel"
airomon-ng start wlan0 $channel,$channel
airodump-ng -c $channel,$channel mon0 &&
terminator -e netstat -ax &&
terminator -e nmap 192.168.1.1
Run Code Online (Sandbox Code Playgroud)
使用整个终端(airodump)的第一个命令启动正常,我可以看到网络,但它只是停留在该屏幕上.如果我按ctrl + c然后它返回提示但我可以看到错误:用法:终结者[选项]错误没有这样的选项
我希望netstat和nmap命令出现并保留在他们自己的终端窗口,我该怎么做?
如果我有一个引用地图的函数:
pair<int,int> myFunc(map<int,char> &myVar){...}
Run Code Online (Sandbox Code Playgroud)
我可以传递一张地图而不需要'&'.
myFunc(someMapitoa);
Run Code Online (Sandbox Code Playgroud)
有什么区别吗?是制作副本然后扔掉?我应该使用'&'吗?