[Gllug] Command line tool to find video dimensions?
Nix
nix at esperi.org.uk
Sat Jun 2 21:56:52 UTC 2007
On 2 Jun 2007, Tethys stated:
> But I'd be surprised if you could find a machine where
> it wasn't internal (that said, I've been surprised by such things
> before, and no doubt will be again).
/bin/sh and /bin/ksh on Solaris 2.8 and below (and perhaps 2.10+ but I
haven't checked yet).
As usual /usr/xpg4/bin/ksh works much better.
(This is one reason for the recommendation to set
SHELL=/usr/xpg4/bin/ksh before bootstrapping GCC on that platform: that
and its use of temporary files and fork() to implement here documents
and redirection around loops...)
>>> sed -rn -e '/^ID_VIDEO_(WIDTH|HEIGHT)/ {s/.*=//;N;s/\n.*=/x/p;h}' \
>>> -e '$ {g;s/^$/unknown size/;T;p}'
>>
>>This sort of sed is probably a criminal offence :)
>
> Pah! Some people just have no sense of beauty :-)
I've used sed as a grep replacement before, but *that* is, well, I
recommend you talk to Greg Ubben one of these days: you obviously think
in similar ways.
--
`On a scale of one to ten of usefulness, BBC BASIC was several points ahead
of the competition, scoring a relatively respectable zero.' --- Peter Corlett
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list