我在 Ubuntu 12.04 上,该ip
实用程序没有ip netns identify <pid>
选项,我尝试安装 new iproute
,但仍然,选项识别似乎不起作用!。
如果我要编写一个脚本(或代码)来列出网络命名空间中的所有进程,或者给定一个 PID,显示它属于哪个网络命名空间,我应该如何进行?(我需要一些进程的信息,以检查它们是否正确netns
)
我正在尝试使用 运行作业at
,并且我有一个bash
脚本(我确实有#!/bin/bash
作为第一行),但是由于使用[[
和]]
在脚本中该作业失败,我在mail
它生成的内容中看到以下内容:
=sh: 58: [[: not found
=sh: 58: [[: not found
=sh: 58: [[: not found
=sh: 58: [[: not found
=sh: 58: [[: not found
Run Code Online (Sandbox Code Playgroud)
这/bin/sh
是指向 的链接dash
,但是如果我#!/bin/bash
在脚本中使用了 she-bang 行- 不应该使用它bash
吗?
PS如果我只是在我的bash
提示下运行脚本- 它可以正常工作,没有错误(并且它具有可执行权限)。
- 编辑 -
我正在添加这样的工作:
$ at 1:30 am today -f /path/to/my/script.sh
$ which bash
/bin/bash
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 …
Run Code Online (Sandbox Code Playgroud)