As Martijn Dekker wrote:

> There is another, less unlikely problem, though: a file system could be
> mounted on a directory with a name containing a newline, which would
> break line-based parsing.

Pipe the output of df -P through "tail -n +2 | head -1". :-)

That way, you don't have to care whether the mountpoint adds rubbish
after a newline.  As I understand it, you are going to apply df -P to
a single file at a time only, so it's sure its filesystem name will
always at the beginning of line 2.

-- 
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)

Reply via email to