Dmitry Bogatov:
> What exactly is decoded? Where should I read about escaping rules?
How it is different from plain `xargs'?
You are suffering from the notoriously poor Linux documentation. (-:
The manuals for fstab on the BSDs explain that the fields are encoded ,
so that they can contain whitespace characters, with strvis() and must
be decoded with strunvis() when read. The BSD C library getfsent()
function does this for one.
It is pretty much undocumented, but roughly the same in fact holds true
for Linux operating systems and their C libraries. It is not the vis
encoding scheme, and is rather an encoding scheme that is peculiar to
fstab. But the fields are encoded so that they can contain whitespace
characters, and the getfsent() library function (or, actually, the
getmntent() library function in the GNU C library) does this for one.
If you read fstab with a program like awk, it will of course read and
process the encoded forms. To actually get hold of the decoded forms,
so that they can be passed as arguments to programs that do not expect
them to be encoded, such as unmount in the example; one has to pass them
through a decoder program. fstab-decode is simply such a decoder
program. It runs all of its arguments through the decoder, and then
execs the result.