mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-02-17 12:52:16 +02:00
Don't assume that 'ls' output is fixed-width.
This commit is contained in:
@@ -74,11 +74,10 @@ for args in 'foo symlink' 'symlink foo' 'foo foo' 'sl1 sl2' 'foo hardlink'; do
|
||||
# and put brackets around the output.
|
||||
test -s _err && echo "[`sed 's/^[^:][^:]*:/cp:/' _err`]"
|
||||
# Strip off all but the file names.
|
||||
# Omit the variable-width owner and group names.
|
||||
ls="`ls -gG --ignore=_err . \
|
||||
| sed \
|
||||
-e '/^total /d' \
|
||||
-e 's/^......................................//'`"
|
||||
-e 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *//'`"
|
||||
echo "($ls)"
|
||||
# Make sure the original is unchanged and that
|
||||
# the destination is a copy.
|
||||
|
||||
Reference in New Issue
Block a user