[Solved] to understatnd substr on awk [closed]


This code converts the standard -rwxrwxrwx style of permissions generated by ls -l into octal numbers that could be used with chmod, and prepends them onto each line.

For example, it would make the following conversions:

-rwxr-xr--
 7  5  4

-rwx-wx---
 7  3  0

Note that this awk script does NOT support sticky or setuid bits.

3

solved to understatnd substr on awk [closed]