#!/bin/csh -f # convert individual pin data for an experiment into a single file # the pin data is converted from a column format to a row format # in the conversion process # syntax: # convert_to_db exp_no1 exp_no2 exp_no3 .... set DB_DIR = db foreach EXP_NO ( ${argv} ) echo "exp_no is: ${EXP_NO}" if ( -f ${DB_DIR}/${EXP_NO}.pin ) then echo "${DB_DIR}/${EXP_NO}.pin: already exists" else foreach file ( exp_0${EXP_NO}/data.pin/*.pin ) echo `basename ${file}` >>! ${DB_DIR}/${EXP_NO}.files transpose ${file} >>! ${DB_DIR}/${EXP_NO}.data end abut ${DB_DIR}/${EXP_NO}.files ${DB_DIR}/${EXP_NO}.data > ${DB_DIR}/${EXP_NO}.pin rm ${DB_DIR}/${EXP_NO}.files ${DB_DIR}/${EXP_NO}.data endif end