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.