简体   繁体   中英

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. 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?

ls -la *.c | awk '{print "Permission:" $1 " Filename:"  $9 }'

Should work with this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM