Automatically piping commands to stdout
When I build docker containers my build log usually looks like this:
#9 24.94 Using 'iris.cpf' configuration file
#9 25.82
#9 27.55 Starting Control Process
#9 27.55 Global buffer setting requires attention. Auto-selected 25% of total memory.
#9 27.55 Allocated 4999MB shared memory
#9 27.55 3915MB global buffers, 391MB routine buffers
#9 29.84 This copy of InterSystems IRIS has been licensed for use exclusively by:
#9 29.84 No local key detected, trying license server.
#9 29.84 Copyright (c) 1986-2026 by InterSystems Corporation
#9 29.84 Any other use is a violation of your license agreement
#9 140.1
#9 140.1 2 alert(s) during startup. See messages.log for details.
#9 140.2 Merging IRIS, please wait...
#9 140.2 Starting IRIS
#9 140.2
#9 140.3
#9 140.3 Node: buildkitsandbox, Instance: IRIS
#9 140.3
#9 140.3 USER>
#9 140.3
#9 140.3 %SYS>
#9 140.3
#9 140.3 %SYS>
#9 140.3
#9 140.3 %SYS>
#9 141.3
#9 141.3 %SYS>
#9 141.3
#9 141.3 %SYS>
#9 141.3
#9 141.3 %SYS>
#9 141.3
#9 141.3 %SYS>
#9 141.4
#9 141.4 Load started on 02/12/2026 00:51:17
#9 141.4 Loading file /home/irisowner/dev/CPF.xml as xml
#9 141.8 Imported class: User.CPF
#9 141.9 Compiling class User.CPF
#9 142.2 Compiling routine User.CPF.1
#9 142.2 Load finished successfully.
#9 142.2
#9 142.2 %SYS>
#9 142.2
#9 142.2 %SYS>
#9 142.2
#9 142.2 %SYS>
#9 142.2
#9 142.2 %SYS>
#9 142.2
#9 142.2 %SYS>
#9 142.2
#9 142.2 %SYS>
#9 142.2
#9 142.2 %SYS>
#9 142.2
#9 142.2 %SYS>
#9 142.2
#9 142.2 %SYS>
#9 142.2
#9 142.2 %SYS>
#9 142.3
#9 142.3 Load of directory started on 02/12/2026 00:51:18
#9 142.3
#9 142.3 Loading file /home/irisowner/dev/src/%ZSTART.mac as udl
#9 142.3 %ZSTART.MAC Loaded
#9 144.4 %SYS>
#9 144.4 <ENDOFFILE>
#9 144.4 <ERRTRAP>Is there any way to record commands? Currently I need to add:
write "About to try ABC"But it would be way better if I could just see what's being executed.
Product version: IRIS 2025.3
Discussion (2)2
Comments
Anyone? Found this idea.
A bit hackish way
{
while IFS= read -r line; do
echo 'write *27,"[1F",$namespace,">", "'$(echo $line | sed "s/\"/\"\"/g" )'",*27,"[1F"'
printf '%s\n' "$line"
done
} <<'EOF' | iris session iris
write $zv
write !,"hello ", $username,!
zn "%sys"
halt
EOFand output
$ bash test.sh
Node: e91a00f6512e, Instance: IRIS
USER>write $zv
IRIS for UNIX (Ubuntu Server LTS for ARM64 Containers) 2026.1.0L (Build 193U) Tue Jan 6 2026 01:46:47 EST
USER>write !,"hello ", $username,!
hello irisowner
USER>zn "%sys"
%SYS>halt