Util-Linux package development
 help / color / mirror / Atom feed
* findmnt: parsing mountpoints with spaces
@ 2012-04-24 14:40 Marcin Szewczyk
  2012-04-24 17:52 ` Karel Zak
  0 siblings, 1 reply; 5+ messages in thread
From: Marcin Szewczyk @ 2012-04-24 14:40 UTC (permalink / raw)
  To: util-linux

Hi,

is there a way to make findmnt print unambiguous output in case of block
devices/directories/mountpoints whose names contain spaces? I can see
that --raw makes findmnt print undecorated output, but spaces remain not
escaped.

May I request a feature of escaping spaces and possibly other
non-printable characters in a fstab manner (\040 for space)?

-- 
Marcin Szewczyk                       http://wodny.org
mailto:Marcin.Szewczyk@wodny.borg  <- remove b / usuń b
xmpp:wodny@ubuntu.pl                  xmpp:wodny@jabster.pl

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: findmnt: parsing mountpoints with spaces
  2012-04-24 14:40 findmnt: parsing mountpoints with spaces Marcin Szewczyk
@ 2012-04-24 17:52 ` Karel Zak
  2012-04-24 17:55   ` Marcin Szewczyk
  0 siblings, 1 reply; 5+ messages in thread
From: Karel Zak @ 2012-04-24 17:52 UTC (permalink / raw)
  To: util-linux

On Tue, Apr 24, 2012 at 04:40:55PM +0200, Marcin Szewczyk wrote:
> Hi,
> 
> is there a way to make findmnt print unambiguous output in case of block
> devices/directories/mountpoints whose names contain spaces? I can see
> that --raw makes findmnt print undecorated output, but spaces remain not
> escaped.
> 
> May I request a feature of escaping spaces and possibly other
> non-printable characters in a fstab manner (\040 for space)?

 Good point, I have already added this to lsblk for LABELs in parsable
 output, it seems that we need this for mountpoint and findmnt too.

 Added to my TODO. Thanks.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: findmnt: parsing mountpoints with spaces
  2012-04-24 17:52 ` Karel Zak
@ 2012-04-24 17:55   ` Marcin Szewczyk
  2012-04-26  7:32     ` Karel Zak
  0 siblings, 1 reply; 5+ messages in thread
From: Marcin Szewczyk @ 2012-04-24 17:55 UTC (permalink / raw)
  To: util-linux

On Tue, Apr 24, 2012 at 07:52:50PM +0200, Karel Zak wrote:
> On Tue, Apr 24, 2012 at 04:40:55PM +0200, Marcin Szewczyk wrote:
> > May I request a feature of escaping spaces and possibly other
> > non-printable characters in a fstab manner (\040 for space)?
> 
>  Added to my TODO. Thanks.

Great. Thank You again.

-- 
Marcin Szewczyk                       http://wodny.org
mailto:Marcin.Szewczyk@wodny.borg  <- remove b / usuń b
xmpp:wodny@ubuntu.pl                  xmpp:wodny@jabster.pl

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: findmnt: parsing mountpoints with spaces
  2012-04-24 17:55   ` Marcin Szewczyk
@ 2012-04-26  7:32     ` Karel Zak
  2012-04-26  7:48       ` Marcin Szewczyk
  0 siblings, 1 reply; 5+ messages in thread
From: Karel Zak @ 2012-04-26  7:32 UTC (permalink / raw)
  To: util-linux

On Tue, Apr 24, 2012 at 07:55:07PM +0200, Marcin Szewczyk wrote:
> On Tue, Apr 24, 2012 at 07:52:50PM +0200, Karel Zak wrote:
> > On Tue, Apr 24, 2012 at 04:40:55PM +0200, Marcin Szewczyk wrote:
> > > May I request a feature of escaping spaces and possibly other
> > > non-printable characters in a fstab manner (\040 for space)?
> > 
> >  Added to my TODO. Thanks.
> 
> Great. Thank You again.

Implemented, but it uses \x<hex> -- I think it's more readable and
also compatible with /dev/disk/by-* udev stuffl, latest DM, etc.

Maybe we can add something like --encode=hex|oct to specify wanted
encoding.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: findmnt: parsing mountpoints with spaces
  2012-04-26  7:32     ` Karel Zak
@ 2012-04-26  7:48       ` Marcin Szewczyk
  0 siblings, 0 replies; 5+ messages in thread
From: Marcin Szewczyk @ 2012-04-26  7:48 UTC (permalink / raw)
  To: util-linux

On Thu, Apr 26, 2012 at 09:32:41AM +0200, Karel Zak wrote:
> > > On Tue, Apr 24, 2012 at 04:40:55PM +0200, Marcin Szewczyk wrote:
> > > > May I request a feature of escaping spaces and possibly other
> > > > non-printable characters in a fstab manner (\040 for space)?

> Implemented, but it uses \x<hex> -- I think it's more readable and
> also compatible with /dev/disk/by-* udev stuffl, latest DM, etc.
> 
> Maybe we can add something like --encode=hex|oct to specify wanted
> encoding.

Any unambiguous encoding is good for me. It's no problem to pipe it to
another tool that can recognize that hex notation. Thanks.

-- 
Marcin Szewczyk                       http://wodny.org
mailto:Marcin.Szewczyk@wodny.borg  <- remove b / usuń b
xmpp:wodny@ubuntu.pl                  xmpp:wodny@jabster.pl

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-04-26  7:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-24 14:40 findmnt: parsing mountpoints with spaces Marcin Szewczyk
2012-04-24 17:52 ` Karel Zak
2012-04-24 17:55   ` Marcin Szewczyk
2012-04-26  7:32     ` Karel Zak
2012-04-26  7:48       ` Marcin Szewczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox