LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

Shortest command to calculate the sum of a column of output

Posted 06-02-2010 at 06:27 AM by bittner (Notes on Linux)

I had to calculate the Installed-Size for a .deb control file recently. Here is the solution I came up with:

Code:
dpkg-deb -c mypackage.deb | sed -e 's/.*root\s*//' -e 's/\s*2010-.*$//' | xargs | tr ' ' + | bc
What it does? The code tries to construct a calculation string and feeds it to the command line calculator bc as follows:
  1. use dpkg-deb to get the file size information out of the Debian package
  2. sed away all characters before and after the
...
LQ Newbie
Posted in Uncategorized
Views 4223 Comments 2 bittner is offline
Old

This is a good restore function too.

Posted 06-02-2010 at 03:43 AM by GlennsPref

I've noticed that this can be used to reinstall a list from

typing

Code:
echo "run rpm -qa | sort | less > /home/glenn/build/note-rpm-installed-list-`date +%Y-%m-%d-%H`.txt, maybe upto 15kb text."/n
sudo rpm -qa | sort | less > /home/glenn/build/note-rpm-installed-list-`date +%Y-%m-%d-%H`.txt
this produces a list, but top-down, no spaces or dashes.

It still works with the code here, just has no...
Senior Member
Posted in Uncategorized
Views 770 Comments 0 GlennsPref is offline
Old

Another good example of you know what

Posted 06-01-2010 at 11:14 PM by AGer (Void cries or bashing time)

I am a subscriber to the Linux Today newsletter. Apparently Linux Today outsourced mailing the newsletter since the links to Web pages in it look like

http://links.mkt3261.com/ctt?kn=26&m...EyS0&mt=1&rt=0

Sometimes this works, sometimes I get the following in the browser

http://links.mkt3261.com/exchweb/bin...u-1009424.html...
Member
Posted in Uncategorized
Views 776 Comments 1 AGer is offline
Old

Howto build your own Debian repository

Posted 06-01-2010 at 05:04 AM by bittner (Notes on Linux)
Updated 06-07-2010 at 07:08 AM by bittner (added reference (background reading))

If you write software for Linux and you write them for Debian systems (Debian, Ubuntu, and others) you may want to provide your software as .deb installation packages. And one day eventually you will want to set up a repository so others can download and install your software without fuzz.

If you look at a Debian mirror (e.g. http://ftp.debian.org/debian/) you will find out one day that packages and meta information is split up into two main directories on the root level:
  • dists
...
LQ Newbie
Posted in Uncategorized
Views 11873 Comments 1 bittner is offline
Old

On being human

Posted 05-30-2010 at 03:51 PM by Mr-Bisquit

Value every moment as it comes along,
conform to no standard.
Accept no limits,
letting yourself experience failure and regret
alongside joy and relief.
Every moment is now.
Never let yourself forget you are always here.
Heaven nor Hell nor even a Day of Judgement
causes me more fear,
Than knowing I have still
trespasses against another.
On being human
'tis no greater
disappointment or pleasure.
On...
Member
Posted in Uncategorized
Views 689 Comments 0 Mr-Bisquit is offline

  



All times are GMT -5. The time now is 06:58 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration