[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#339136: Changes in stat package output break apt-move
From: |
Jim Meyering |
Subject: |
Re: Bug#339136: Changes in stat package output break apt-move |
Date: |
Tue, 15 Nov 2005 15:14:27 +0100 |
Michael Stone <address@hidden> wrote:
...
> My main concern here is that there is no way for someone to use
> stat -c "%whatever" file1 file2
> and expect it to work for both syntaxes without reverting to some truely
> hideous sed games or somesuch.
But there *is* a way. It's just that the portable solution
doesn't fit on one line:
$ stat -c '%G
> ' / /
root
root
You can also do something like this:
#!/bin/sh
nl='
'
stat -c "%G$nl" / /
If you don't mind relying on a feature that
works in both bash and zsh, there's yet another way:
$ stat -c $'%G\n' / /
root
root