A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
22
Task/Menu/AWK/menu.awk
Normal file
22
Task/Menu/AWK/menu.awk
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# syntax: GAWK -f MENU.AWK
|
||||
BEGIN {
|
||||
n = split("fee fie:huff and puff:mirror mirror:tick tock",arr,":")
|
||||
while (1) {
|
||||
print("")
|
||||
for (i=1; i<=n; i++) {
|
||||
printf("%d - %s\n",i,arr[i])
|
||||
}
|
||||
print("0 - exit")
|
||||
printf("enter number: ")
|
||||
getline ans
|
||||
if (ans in arr) {
|
||||
printf("you picked '%s'\n",arr[ans])
|
||||
continue
|
||||
}
|
||||
if (ans == 0) {
|
||||
break
|
||||
}
|
||||
print("invalid choice")
|
||||
}
|
||||
exit(0)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue