How to get the filename of files in an archive correctly?

Stefan Hammerl via Dar-support <[email protected]>
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <CAA27OgQq0WKaquP-XBD5xcMFrx82dqToiTceOepx=76x=3iakw@mail.gmail.com>
Hello,

currently I am using the dar --list command to get a list of files in
the archive. Usually this works for parsing the output and extracting
the filename.
I am having problems if the file ends with a whitespace as the list
command shows for example:

[Data ][D][ EA  ][FSA][Compr][S]| Permission | User  | Group | Size
|          Date                 |    filename
--------------------------------+------------+-------+-------+---------+-------------------------------+------------
[Saved][ ]       [-L-][     ][ ]  -rw-rw-r--   stefan  stefan 0
Tue Apr 27 18:43:50 2021        spaceAtTheEnd

'spaceAtTheEnd     ' is a valid unix file name but there is no chance
to get that via command line interface. Extraction of that file is
working as expected.

Is there a better way to get the filename?


Best regards,
Stefan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.