Oddity with awk in pdpcontrol.sh ?

39 views
Skip to first unread message

W Travis

unread,
May 15, 2026, 1:56:27 AM (11 days ago) May 15
to PiDP-10
I wasn't working very carefully, and didn't notice exactly when this issue popped up. I suspect it was after an 'apt upgrade' and reboot, but, that's hardly helpful.

I noticed that with switch 28 '1' (down) , hills-blinky would be launched instead of tops-20 . 

I did some experiments and it comes down to this diff, which repairs the issue. But, I do not exactly know why the diff is necessary. The awk worked without this diff in days past.

Also, since this problem has not been discussed here, I presume no one else is seeing it. So I am wondering, what did I break in my environment?

I have recompiled the sims to move to 2.38 libc.so , but that does not alter pdpcontrol.sh .

The diff:

diff --git a/bin/pdpcontrol.sh b/bin/pdpcontrol.sh
index 5540a1c..5fa712c 100755
--- a/bin/pdpcontrol.sh
+++ b/bin/pdpcontrol.sh
@@ -64,7 +64,7 @@ do_start() {
                sys=`printf "%04o" $boot_number`
        fi
 
-       sel=`awk '$1 == '$sys' { sys = $2; exit } END { if(sys) print sys; else print "hills-blinky" }' < /opt/pidp10/systems/selections`
+       sel=`awk '$1 == "'$sys'" { sys = $2; exit } END { if(sys) print sys; else print "hills-blinky" }' < /opt/pidp10/systems/selections`
        if [ "$boot_number" -ge 16 ]; then
                pidp_bin="pdp10-ki"
        fi


That's the question.. everything below is just background info:

pidp@pidp10:/opt/pidp10/bin $ echo $SHELL ; echo $LANG
/bin/bash
en_GB.UTF-8
pidp@pidp10:/opt/pidp10/bin $ awk --version
GNU Awk 5.2.1, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.2.0, GNU MP 6.2.1)
Copyright (C) 1989, 1991-2022 Free Software Foundation.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
pidp@pidp10:/opt/pidp10/bin $ uname -a
Linux pidp10 6.12.75+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1~bookworm (2026-03-11) aarch64 GNU/Linux

steve...@gmail.com

unread,
May 15, 2026, 4:13:23 PM (10 days ago) May 15
to PiDP-10

That could be intentional. The top of page 9 of the PiDP-10 Systems User's Guide (https://obsolescence.dev/pidp10-sw/PiDP-10_Manual.pdf) talks about different octal digits being able to bring up different versions of the PDP-10 CPU: KL10, KI10, and KA10. That's needed since some OSs don't run on some CPUs. Early versions of the PiDP-10 software didn't honor that (or, didn't honor it correctly) so I filed a defect report. This may be the result of that finally being fixed.

-- steve
Reply all
Reply to author
Forward
0 new messages