[Gllug] Downright fun

David Pashley david at parguild.co.uk
Mon Mar 10 14:12:19 UTC 2003


Allen Baranov said, and I quote:
> On Saturday 08 March 2003 17:01, David Pashley wrote:
> 
> > I could scare you with bash one liners. ;)
> >
> I love those. The only one I have an issue is -> |sort |uniq -c |sort. There 
> has to be a better way. But I love awk to bits. 
> 
I haven't done much awk. Mostly when cut can't cut it. :) I do find
myself writing an awful lot more shell than perl these days. I've
attached (if I remember) is a script which I use in Debian packaging.
all the files are installed into debian/tmp and then copied out into
debian/libfoo1 and debian/libfoo-dev for example. The script looks to
see what files are in debian/tmp, but not in any of the packages.
Amazingly it is just one line.

> I guess I love software that I underestimate and then it suprises me. awk does 
> that. cpan has some neat stuff in it.

CPAN is one of the better things about perl. Stuff like Class::DBI just
rocks my world. If only C++ had an equivelent.
> 
> > I know I will probably get flamed for saying this, but if you really
> > like up to date software, I would recommend that you give Debian
> > unstable a try. Just to be fair, I should also recommend gentoo, but
> > I've never used it so YMMV.
> I've been using redhat too long to move across even though debian does 
> interest me. Maybe one day.... The software I support is also only officially 
> supported on RedHat so its my distribution of choice.
> 
A very good reason for the LSB. I just hope it takes off more for
commercial applications. Very similar to the browser detection stuff we
have been discussing recently.

> Gentoo interested me enough to download it and try it out but waiting 3 days 
> for an operating system without X is way too long for me. If I had a faster 
> PC and network connection then I'd give it more of my time. Sure it has X and 
> KDE support but after 3 days I'd had enough compiling and enough of the 
> bandwidth at work. Its an interesting distribution and I hope it goes far. 
> 

-- 
David Pashley
david at davidpashley.com
Nihil curo de ista tua stulta superstitione.
-------------- next part --------------
#!/bin/bash 

# this is scare bash stuff. don't worry if you don't understand it
diff -u  \
<(find debian/tmp -type f -o -type l | sort) \
<({ for package in $(dh_listpackages); do 
   find debian/$package -type f -o -type l | cut -f 3- -d "/" 
done 
} | sed -e 's#^#debian/tmp/#' | sort -u )  \
| grep ^[-] | cut -c2-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20030310/e0b9c671/attachment.pgp>


More information about the GLLUG mailing list