mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-18 17:29:28 +03:00
* 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:
parent
c0d8ea01b9
commit
4f9c3415a5
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user