Archive for the ‘Tech’ Category

aix printer backend (recover file name)

Thursday, August 25th, 2016

# AIX queuing system backend for SMS processing
# This AIX queuing system backend is used in the conversion
# of McDonalds SMS files to HR-Access
# It performs the following tasks
# – Recovers the original filename of the SNS file
# from the queuing system control file
# – Copies the file to a spooling location with its original name
# – Resubmit the job to the final processing queue with new user
# (depends on sudo being correctly configured)
# Created: 18.10.06 Markus Baertschi, IBM

# recover the environment from the path where the file is stored
# example: /home/hrprd/bin/ -> prd
HRENV=$(dirname $0)
# define sone of the variables we use

# write all output to the logfile
exec 2>&1 >> $LOG

echodate () {
echo “$(date +’%d.%m.%y %H:%M:%S’) $*”

echo “=========== ===============”
echodate “Args: $*”
echodate “User: $HRENV/$HRUSER/$HRQUEUE Id:$(id)”

echo “Spooled file name: $FNAME”

# Search for the control file of my job
CFILE=$(grep -l “$FNAME” /var/spool/lpd/qdir/*)
if [ -z “$CFILE” ]
print “Error: control file for $1 not found”
echo “!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!”
exit 1
# Extract the original filename from the control file
JNAME=$(awk -F”\-[TB]” ‘/\-T/{print $2;}’ “$CFILE”)
if [ -z “$JNAME” ]
print “Error: job name in ‘$CFILE’ not found”
echo “!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!”
exit 1

echodate “Extracted Job name: $JNAME”
# Copy the job file to a spool directory (to be created if necessary)
# and change its owner to the target user
mkdir -p $SMSDIR
sudo chown $HRUSER $JNAME
ls -l $JNAME

# Re-submit the file to the SMS processinq queue Inflatables Quality using the target user
echo sudo su – $HRUSER -c $CMD
sudo su – $HRUSER -c $CMD

lpstat -psmsprd
echo “———– ———–“

Basic ksh configuration

Monday, January 1st, 2007

The AIX command line, as shipped by IBM, has no comfort whatsoever. This is unfortunate as it is easy to add some basic stuff to make life much easier. Here what I install on a new AIX box as soon as possible.Inflatable Water Slide


TW-100: Service Manual

Monday, January 1st, 2007

The TW-100 is a nice, but not well known shortwave transceiver. It was built by Transworld in California for government agencies and NGO’s. The set is solidly build and uses high quality components.

A while ago I’ve spent some time scanning the complete service manual of the transceiver. It should be complete and I will correct omissions or errors as far as possible.


TW-100: Muting mod

Monday, January 1st, 2007

When you fine-tune the operating frequency the TW-100 has the unfortunate habit of muting the speaker on each keypress/frequency step.

This mod describes how to disable this muting facility on your TW-100.


TW-100: LF/MF Sensitivity mod

Monday, January 1st, 2007

The TW-100 features a high pass filter to reject low frequency signals. This filter is very effective to suppress the signal of your 10MW MF station 2 miles away. UnfortunatelyEast Inflatables, if you don’t have this station and would like to use the TW to listen to signals below 1600kHz, there is no way to switch it off. (more…)