demo: Eingabemaske entry für screen
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
Mail List Entry Form
|
||||
|
||||
Name : <Name> Company: <Company>
|
||||
Street: <Street>
|
||||
City : <City> State : <State> ZIP: <ZIP>
|
||||
Phone : <Phone>
|
||||
+5
-2
@@ -182,8 +182,11 @@ report form < maillist
|
||||
## label prints mailing labels, letter prints form letters
|
||||
label < maillist
|
||||
letter form < maillist | head -5
|
||||
## screen turns a form into a shell script that asks for the fields
|
||||
screen < form | head -6
|
||||
## screen turns a form into a shell script that asks for the fields. Use a form with labels
|
||||
## and every column once (entry); the report template `form` would give a blank, doubled screen.
|
||||
## Run the script with: CLEAR=$(clear.rdb) sh script > table 2>&1 (the table goes to stderr)
|
||||
cat entry
|
||||
screen < entry
|
||||
## reportwriter: a sample report with page headings (the date is cut out)
|
||||
reportwriter -3 Prices < inventory | grep -v 'Report Date'
|
||||
## tabletom4 / tabletosed / tabletostruct were shown above
|
||||
|
||||
+33
-6
@@ -735,14 +735,41 @@ McDonalds
|
||||
123 Mac Attack
|
||||
Memphis, TENN 30000
|
||||
|
||||
## screen turns a form into a shell script that asks for the fields
|
||||
$ screen < form | head -6
|
||||
## screen turns a form into a shell script that asks for the fields. Use a form with labels
|
||||
## and every column once (entry); the report template `form` would give a blank, doubled screen.
|
||||
## Run the script with: CLEAR=$(clear.rdb) sh script > table 2>&1 (the table goes to stderr)
|
||||
$ cat entry
|
||||
Mail List Entry Form
|
||||
|
||||
Name : <Name> Company: <Company>
|
||||
Street: <Street>
|
||||
City : <City> State : <State> ZIP: <ZIP>
|
||||
Phone : <Phone>
|
||||
$ screen < entry
|
||||
: paint crt screen
|
||||
exec 1>/dev/tty
|
||||
cat <<SCREEN
|
||||
${CLEAR}
|
||||
|
||||
|
||||
${CLEAR} Mail List Entry Form
|
||||
|
||||
Name : Company:
|
||||
Street:
|
||||
City : State : ZIP:
|
||||
Phone :
|
||||
SCREEN
|
||||
: read user input
|
||||
cursor 3 9 ; read Name;
|
||||
cursor 3 37 ; read Company;
|
||||
cursor 4 9 ; read Street;
|
||||
cursor 5 9 ; read City;
|
||||
cursor 5 37 ; read State;
|
||||
cursor 5 56 ; read ZIP;
|
||||
cursor 6 9 ; read Phone;
|
||||
: output table head
|
||||
exec 1>&2
|
||||
echo "Name Company Street City State ZIP Phone"
|
||||
echo "---- ------- ------ ---- ----- --- -----"
|
||||
: append row
|
||||
echo "$Name $Company $Street $City $State $ZIP $Phone"
|
||||
## reportwriter: a sample report with page headings (the date is cut out)
|
||||
$ reportwriter -3 Prices < inventory | grep -v 'Report Date'
|
||||
Prices
|
||||
@@ -777,7 +804,7 @@ Item Amount Cost Value Description
|
||||
## tabletom4 / tabletosed / tabletostruct were shown above
|
||||
## ===== Help and the terminal =====
|
||||
$ rdb --version
|
||||
rdb 0.2.0
|
||||
rdb 0.3.0
|
||||
$ howmany
|
||||
134
|
||||
$ whatis row
|
||||
|
||||
Reference in New Issue
Block a user