2009/04/03

Playing with Crosstool

Not really playing.

Crosstool itself
A version of GCC to compile the compiler (usually something somewhat old)
A GCC Compiler to Compile (usually something new-ish)
A version of glibc
A "sanitized" version of the linux kernel headers


Google Search For Crosstool: http://www.google.com/search?q=crosstool
A quickie script to gather difference between(delta) two unix epoch seconds time values.


#!/usr/bin/perl
use warnings;
use strict;
use Date::Manip;
my $delta;
my $date1;
my $date2;
my $err = undef;
print "Thank you for running $0\n";

print "Enter Unix Time Seconds Value Start:";
chomp($date1 = <STDIN>);
$date1 = ParseDateString("epoch $date1");
print "Enter Unix Time Seconds Value Finish:";
chomp($date2 = <STDIN>);
$date2 = ParseDateString("epoch $date2");

$delta = DateCalc ($date1,$date2, \$err);
print "the \$delta is [$delta]\n";

2009/04/01

Bash Tidbit: environment variables after escaped semicolons

If you find yourself in need of embedding an environment variable in a path directly after an escaped semicolon (something that happens when you have version control tools like Telelogic, which use semicolons as a project toplevel node delimiter) it is possible to merely use backticks "`<around the command>`" to get the desired effect.

Say your default case on the command line to list the directory contents is thus:


ls /mnt/buford/d/teledb/ccm_wa/poobits01/foo.bar\;foo.bar99.99_int/foo.bar/


And you want the 'foo.bar99.99' to be something settable in a shell variable called $REL you then would insert the following to do such a thing:

REL=foo.bar99.99
ls /mnt/buford/d/teledb/ccm_wa/poobits01/foo.bar\;`echo $REL`_int/foo.bar/