* extfs/lslR (mclslRfs_list): Don't use gawk-specific features.

Don't hardcode gawk. Don't rely on the date format occupying a
fixed number of fields.
This commit is contained in:
Pavel Roskin 2001-02-23 08:45:13 +00:00
parent c0d8ea01b9
commit 4f9c3415a5
2 changed files with 12 additions and 6 deletions

View File

@ -1,5 +1,9 @@
2001-02-23 Pavel Roskin <proski@gnu.org>
* extfs/lslR (mclslRfs_list): Don't use gawk-specific features.
Don't hardcode gawk. Don't rely on the date format occupying a
fixed number of fields.
* extfs/uzip.in (mczipfs_list): Don't check zipinfo support on
the real file - check usage info instead. Use more robust checks
for valid lines. Suppress stderr from unzip. Workaround for jar

View File

@ -15,21 +15,23 @@ case "$1" in
*) MYCAT="$CAT";;
esac
$MYCAT "$1" | gawk '
$MYCAT "$1" | @AWK@ '
BEGIN { dir="" }
/^total\ [0-9]*$/ { next }
/^$/ { next }
/^[^[:blank:]].*:$/ {
/^[^ ].*:$/ {
if ($0 ~ /^\//) dir=substr($0, 2);
else dir=$0;
if (dir ~ /\/:$/) sub(/:$/, "", dir);
else sub(/:$/, "/", dir);
next;
}
{
printf "%s %3d %-8s %-8s %8d %3s %2d %5s %s", $1, $2, $3, $4, $5, $6, $7, $8, dir
for (i=1; i<9; i++) sub("[^[:blank:]]+[[:blank:]]+", "");
printf "%s\n", $0
/:/ {
# gensub is not portable.
name=$0
sub(/^[^:]+:[^ ]+[ ]+/, "", name)
attr=substr($0, 1, length($0)-length(name))
printf "%s%s%s\n", attr, dir, name
}' 2>/dev/null
}