LDP/LDP/guide/docbook/abs-guide/colm.sh

17 lines
448 B
Bash
Raw Normal View History

2002-04-01 16:05:47 +00:00
#!/bin/bash
2008-07-20 23:16:47 +00:00
# colms.sh
# A minor modification of the example file in the "column" man page.
2002-04-01 16:05:47 +00:00
(printf "PERMISSIONS LINKS OWNER GROUP SIZE MONTH DAY HH:MM PROG-NAME\n" \
; ls -l | sed 1d) | column -t
2008-07-20 23:16:47 +00:00
# ^^^^^^ ^^
2002-04-01 16:05:47 +00:00
# The "sed 1d" in the pipe deletes the first line of output,
#+ which would be "total N",
#+ where "N" is the total number of files found by "ls -l".
# The -t option to "column" pretty-prints a table.
exit 0