/usr/share/dx/samples/outboard/makedata is in dxsamples 4.2.0-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | #! /bin/csh -f
# initialize the counter
@ i=1
# remove the temporary files, if they exist. This is in case this shell
# script is interupted before finishing and cleaning up.
/bin/rm tmpdata
/bin/rm tmppos
/bin/rm tmpheaddata
/bin/rm tmpheadpos
/bin/rm tmpheadfield
/bin/rm tmpdatafile.dx
while ($i <= 100)
@ data = ($i % 3) + ($i % 5) + ($i % 11) + ($i % 17)
# write out the new temp data file
echo "$data" >> tmpdata
# write out the new temp positions file
echo "$i" >> tmppos
# write out the new temp header files
echo "object 1 class array type float rank 1 shape 1 items $i" > tmpheadpos
echo " data follows" >> tmpheadpos
echo "object 2 class array type float rank 0 items $i " > tmpheaddata
echo " data follows" >> tmpheaddata
echo ' attribute "dep" string "positions" ' > tmpheadfield
echo "object 3 class field" >> tmpheadfield
echo ' component "positions" value 1' >> tmpheadfield
echo ' component "data" value 2' >> tmpheadfield
# put it all together
cat tmpheadpos tmppos tmpheaddata tmpdata tmpheadfield > tmpdatafile.dx
mv tmpdatafile.dx datafile.dx
# increment the counter
@ i++
# pause for awhile
sleep 1
end
# remove temporary files
/bin/rm tmpdata
/bin/rm tmppos
/bin/rm tmpheaddata
/bin/rm tmpheadpos
/bin/rm tmpheadfield
/bin/rm tmpdatafile.dx
|