scripts

Writing always in the same line in bash

Have you ever wanted to write a bunch of words just in the same line over and over again?
Many applications, like encoders or converters, do that in order to show dynamic information to the user without filling up the screen (and thus the terminal buffer).

Here is how you can do it easily in bash.

The code is quite simple:

while :; do
echo -n -e "\r$(date)"
sleep 1
done

The trick consists of three parts:

0
Source: My. Debian.

libbash 0.9.10.b (Default branch)

libbash is a tool that enables bash dynamic-like
shared libraries. It does this by managing bash
scripts that contain functions you may want to use
in various scripts. It is currently provided in Slackware, Gobolinux, CCux Linux, NimbleX, and FrugalWare.

License: GNU General Public License (GPL)

Changes:
A multi-word bug in the getopts library has been fixed. Debian packages have been added.

0
Source: [SoftRatty]

mk-build-deps: create a dummy package depending on a package's build-deps

When I work on a package, I often find that I want to have build-deps installed in a way that I remember why I did install them in the first place. apt-get build-dep is not a proper solution for me for two reasons:

0
Source: Vincent Fourmond Blog

Improvements for the machine-readable debian/copyright emacs mode


Since the last post, I have significantly improved debian-mr-copyright-mode, that now provides an interactive function, debian-mr-copyright-scan-files that shows which files are covered by which clause of the debian/copyright file. I've also significantly improved my understanding of font lock and emacs lisp in general...

0
Source: Vincent Fourmond Blog

A bzr repository for my debian-related works

I'm always scripting quite a lot, and I always store them in SVN in my personal backed-up server. However, it is not very convenient for sharing, as it is not always on and completely locked anyway. So I thought I could rather use a bzr repository on people.debian.org. I did set it up yesterday. There probably will be several branches in the future, but there currently is only one:

bzr branch http://people.debian.org/~fourmond/bzr/scripts

It currently contains one script, rdebsums that runs debsums on one package and on all its dependencies. It is the answer to a wishlist bug I submitted long ago against debsums. Enjoy !

0
Source: Vincent Fourmond Blog

Find all package from a repository that install a file somewhere

As I'm trying to provide a much cleaner way to wrap java programs into scripts for Debian, I need to know how many of the package maintained by the Debian Java Team install scripts in /usr/bin/. I first thought that the way to go was to use apt-file for doing so, running apt-file show on each package found in the repository. Bad idea: it takes, say, 10 seconds to run apt-file show on my machine. Mutliply that by around 600 binary packages, it takes some time.

0
Source: Vincent Fourmond Blog