3 ms·
Where would I find the source code for the version of the command line utility "column" that ships with Debian? The BSD one doesn't handle consecutive tabs in a
by Myrmornis 13y ago
Where would I find the source code for the version of the command line utility "column" that ships with Debian? The BSD one doesn't handle consecutive tabs in a .tsv. I since wrote a version in go as an exercise but I'd still like to know how to find the source for debian's version.
- aw3c2 13y agoIt's manpage tells me > The column command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/ so http://sources.debian.net/src/util-linux http://sources.debian.net/src/util-linux
- deleted 13y ago[deleted]
- viraptor 13y agoFor any debian package questions like that: - go to packages.debian.org - search by name or by file: http://packages.debian.org/search?searchon=contents&keywords=column&mode=path&suite=stable&arch=any http://packages.debian.org/search?searchon=contents&keywords... - check the package page: http://packages.debian.org/wheezy/bsdmainutils http://packages.debian.org/wheezy/bsdmainutils - in the column on the right, you'll see a "Download Source Package" section with all the relevant files Or if you have debian/ubuntu running, just "apt-get source bsdmainutils"
- kragen 13y agoHere's how to find and download the source for any command you have installed on any Debian or Debian-derived distribution: ~$ type column column is /usr/bin/column ~$ dpkg -S /usr/bin/column bsdmainutils: /usr/bin/column ~$ apt-get source bsdmainutils Reading package lists... Done Building dependency tree Reading state information... Done NOTICE: 'bsdmainutils' packaging is maintained in the 'Git' version control system at: git://git.debian.org/git/bsdmainutils/bsdmainutils.git Need to get 277 kB of source archives. Get:1 http://ftp.br.debian.org/debian/ wheezy/main bsdmainutils 9.0.3 (dsc) [1,060 B] Get:2 http://ftp.br.debian.org/debian/ wheezy/main bsdmainutils 9.0.3 (tar) [276 kB] Fetched 277 kB in 15s (17.7 kB/s) gpgv: keyblock resource `/home/user/.gnupg/trustedkeys.gpg': file open error gpgv: Signature made Mon 11 Jun 2012 07:32:33 AM ART using DSA key ID 29F19BD1 gpgv: Can't check signature: public key not found dpkg-source: warning: failed to verify signature on ./bsdmainutils_9.0.3.dsc dpkg-source: info: extracting bsdmainutils in bsdmainutils-9.0.3 dpkg-source: info: unpacking bsdmainutils_9.0.3.tar.gz ~$ cd bsdmainutils-9.0.3/ ~/bsdmainutils-9.0.3$ ls config.mk debian freebsd.h Makefile patches README usr.bin ~/bsdmainutils-9.0.3$ find -name 'column*' ./usr.bin/column ./usr.bin/column/column.c ./usr.bin/column/column.1 ./debian/patches/column_nomerge.diff ./debian/patches/column.diff ./debian/patches/column_empty_lines.diff ./debian/patches/column_empty.diff ./debian/patches/column_error.diff Note that the Debian package separately includes the Debian-specific patches which, presumably, fix the bug you're suffering from. (`apt-get source` applied the diffs automatically, but they are useful when you want to, say, patch your BSD to fix the same bug.) If you don't have the command installed, you can't use `type` and `dpkg -S` to find out what package it's in. Instead, use `apt-file`, which is not installed by default: ~/bsdmainutils-9.0.3$ apt-file search /column | wc -l 459 Oof. ~/bsdmainutils-9.0.3$ apt-file search /column | grep /column$ bsdmainutils: /usr/bin/column yasnippet: /usr/share/emacs/site-lisp/yasnippet/snippets/text-mode/sql-mode/column
- ernesth 13y agoSo, as the other answerers said column belongs in the bsdmainutils package whose source and particularly debian patches you can explore through sources.debian.net. The patch you are looking for is probably http://sources.debian.net/src/bsdmainutils/9.0.5/debian/patches/column_nomerge.diff http://sources.debian.net/src/bsdmainutils/9.0.5/debian/patc...
- eliasmacpherson 13y agohttp://stackoverflow.com/a/12536109 http://stackoverflow.com/a/12536109 Being cheeky, while you're there it would be nice to have single spaced columns rather than double spaced :)
- Myrmornis 13y agoThanks for all the answers!