
 BASE=`pwd`
APPLDIR=$BASE/appl
DATADIR=$BASE/data
PATH=$PATH:$BASE/ihd/bin:.
export PATH APPLDIR DATADIR
$APPLDIR/sh/items " " | sort -t"^" -k9|
 awk -F"^" ' BEGIN {
print "var id = new Array()"
print "var itm = new Array()"
print "var prc = new Array()"
print "var prr = new Array()"
z=0
}
{
print "id["z"]=\""$1"\""
print "itm[\""$1"\"]=\""trail($9)"\""
print "prr[\""$1"\"]="trail($10)
print "prc[\""$1"\"]="trail($12)
z++
}
function trail(txt) { while (substr(txt,length(txt),1)==" ") txt=substr(txt,1,length(txt)-1); return (txt) }
 ' >../js/itemsf.js
