n***@gmail.com
2015-10-17 17:07:12 UTC
I'm writing in LEO now, and the menu/matrix needs fixed-width-font.
Here's a little example re. criticising Oberon's english full-words,
instead of abreviations. The *code* below : of 4 lines, has 2 lines
to try to explain that/how it produces the test-case below that.
And it also shows the power of menues, as ETHO has acknowledged.
And it relates to higher-level functions, in that
PROCEDURE Mx(RowColm(4,6): Text , <other args>): RetType;
might be way of passing the argument: "/mnt/ReiseBrdg"
#!/bin/sh
# Show RowColm numbered MatrixMenu to select Row, Colum: entry.
# add line-no & show some fields of 'df'
df | awk '{print NR " " $0}' | more
echo " 1 2 3 4 5 6"
read -p "ROW/ COLM =" ROW COLM
df |head -$ROW |tail -1 | awk -v n=$COLM '{print $n}'
exit 0
==> test result output: first show the matrix/menu; them prompt & read Row,Colum:--
~:RowColm
1 Filesystem 1K-blocks Used Available Use% Mounted on
2 /dev/root 7692876 7040288 261812 97% /
3 tmpfs 968028 0 968028 0% /dev/shm
4 /dev/hda16 3903620 2223872 1679748 57% /mnt/ReiseBrdg
5 /dev/hda6 2071384 1750000 216160 90% /mnt/hdc6
6 /dev/hda11 980308 782068 148444 85% /mnt/hdc11
7 /dev/hda14 7692876 5652268 1649832 78% /mnt/FC1
8 /dev/hda17 14421344 6618584 7070200 49% /mnt/DebDVD1bak
9 /dev/sdb1 4182016 3508840 673176 84% /mnt/ZTE
1 2 3 4 5 6
ROW/ COLM =8 6
/mnt/DebDVD1bak
------------------------- end of test result output.
Terseness only suits you if/when YOU understand it.
Here's a little example re. criticising Oberon's english full-words,
instead of abreviations. The *code* below : of 4 lines, has 2 lines
to try to explain that/how it produces the test-case below that.
And it also shows the power of menues, as ETHO has acknowledged.
And it relates to higher-level functions, in that
PROCEDURE Mx(RowColm(4,6): Text , <other args>): RetType;
might be way of passing the argument: "/mnt/ReiseBrdg"
#!/bin/sh
# Show RowColm numbered MatrixMenu to select Row, Colum: entry.
# add line-no & show some fields of 'df'
df | awk '{print NR " " $0}' | more
echo " 1 2 3 4 5 6"
read -p "ROW/ COLM =" ROW COLM
df |head -$ROW |tail -1 | awk -v n=$COLM '{print $n}'
exit 0
==> test result output: first show the matrix/menu; them prompt & read Row,Colum:--
~:RowColm
1 Filesystem 1K-blocks Used Available Use% Mounted on
2 /dev/root 7692876 7040288 261812 97% /
3 tmpfs 968028 0 968028 0% /dev/shm
4 /dev/hda16 3903620 2223872 1679748 57% /mnt/ReiseBrdg
5 /dev/hda6 2071384 1750000 216160 90% /mnt/hdc6
6 /dev/hda11 980308 782068 148444 85% /mnt/hdc11
7 /dev/hda14 7692876 5652268 1649832 78% /mnt/FC1
8 /dev/hda17 14421344 6618584 7070200 49% /mnt/DebDVD1bak
9 /dev/sdb1 4182016 3508840 673176 84% /mnt/ZTE
1 2 3 4 5 6
ROW/ COLM =8 6
/mnt/DebDVD1bak
------------------------- end of test result output.
Terseness only suits you if/when YOU understand it.