这个指令怎么写?

[复制链接]
查看11 | 回复2 | 2021-1-27 06:45:09 | 显示全部楼层 |阅读模式
想同时比较下时间,但是出错。
$time[gzip|bzip2|xz]-cservices>services.[gz|bz2|xz]
-bash:xz]:commandnotfound
-bash:bz2:commandnotfound
-bash:[gzip:commandnotfound
-bash:xz]:commandnotfound
real0m0.005s
user0m0.001s
sys0m0.001s
bash怎么写才对?这个是哪个shell的用法?
分 -->
回复

使用道具 举报

千问 | 2021-1-27 06:45:09 | 显示全部楼层
shell没这个用法吧?
一般文档里会用[opt1|opt2|opt3]来表示N选1。

试试
forcmdingzipbzipxz;dotime$cmd-cIN_FILE>OUT_FILE.$cmd;done
回复

使用道具 举报

千问 | 2021-1-27 06:45:09 | 显示全部楼层
不懂你神马意思
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行