[英]How can I print only the c file's name and authority of the c file in Bash shell?
I want to print only the name and authority of the c file in Bash.我只想打印 Bash 中 c 文件的名称和权限。 I know how to print the names and permissions of all files with the awk command, but how can I print only the c file?我知道如何使用 awk 命令打印所有文件的名称和权限,但是如何仅打印 c 文件?
ls -la *.c | awk '{print "Permission:" $1 " Filename:" $9 }'
Should work with this.应该与这个一起工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.