我正在表演
$ ls -l | awk '{print substr($9,substr1,11)}' | uniq | xargs -i ls {}*
ls: cannot access telneter.py*: No such file or directory
ls: cannot access telnetlib.p*: No such file or directory
ls: cannot access threading.p*: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我的意思是它搜索文件文件*但是它告诉我它找不到文件,因为它实际上用实际的*来查找它们但我想用*搜索所有文件而不是用*结尾的文件.
有人可以帮忙吗?
谢谢
该*来不及由外壳来解释得到.所以,在子shell中做.
ls -l | awk '{print substr($9,substr1,11)}' | uniq | xargs -i bash -c "ls {}*"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1497 次 |
| 最近记录: |