To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.admin.generalOpen lugnet.admin.general in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Administrative / General / 4175
4174  |  4176
Subject: 
Re: Parsing Pause database
Newsgroups: 
lugnet.general, lugnet.admin.general, lugnet.off-topic.geek
Date: 
Fri, 14 Jan 2000 04:32:51 GMT
Viewed: 
138 times
  
In lugnet.general, Bram Lambrecht writes:
Has anyone coded some kind of utility which performs something similar to
the following:

Input: text file with list of set numbers
Output: text file with set number, set name, number of pieces, and retail
price

I suppose the output would be delimited using commas or tabs or something.
I would love something like this (I don't really need *all* the parts, but
I'd prefer to at least have the number of pieces) to aid in inventorying my
LEGO collection.

Here's a q&d pseudo-grep, if that helps...

#!/bin/sh
cat /home/username/lego/bynumber.txt | \
perl -e 'my %x = map {(split(/\t/,$_,2))[0], $_} grep {/^\d.*\t/} <STDIN>;
         print join "", map {$x{$_}} @ARGV;' $*

--Todd



Message has 1 Reply:
  Re: Parsing Pause database
 
(...) What exactly does this bit of code do? How do I use it? (I've done some programming, but only in C, and nothing really fancy) Where can I get a copy of bynumber.txt?--if it includes all the info I need, I could probably throw some code (...) (25 years ago, 15-Jan-00, to lugnet.general, lugnet.admin.general, lugnet.off-topic.geek)

Message is in Reply To:
  Parsing Pause database
 
Has anyone coded some kind of utility which performs something similar to the following: Input: text file with list of set numbers Output: text file with set number, set name, number of pieces, and retail price I suppose the output would be (...) (25 years ago, 13-Jan-00, to lugnet.general, lugnet.admin.general, lugnet.off-topic.geek)

11 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR