Bash:通过for-in-loop执行文件

时间:2018-09-05 06:45:46

标签: bash syntax

for executablefile in ./*.out; do executablefile; done

从标题中我应该尝试用bash来进行自我解释。不幸的是,没有一个在线教程能够做到这一点。您可以发布一个有效的示例并解释您的更改吗?

1 个答案:

答案 0 :(得分:0)

您是否尝试过使用正确的变量语法?

temp.write_all(any_as_u8_slice(&(packet.header.ts.tv_sec as u32))).unwrap();
temp.write_all(any_as_u8_slice(&(packet.header.ts.tv_usec as u32))).unwrap();
temp.write_all(any_as_u8_slice(&packet.header.caplen)).unwrap();
temp.write_all(any_as_u8_slice(&packet.header.len)).unwrap();