March 2002
Beginner
504 pages
10h 47m
English
| 1: | Using the for statement, write an awk script that prints each of the fields in a record in reverse order. |
| 2: | Write an awk script that balances a checking account. Your program needs to print the balance in the account every time the user makes a transaction.
The transactions are stored in a file. Each line or record in the file has the following format: command:date:comment:amount Here date is the date on which the transaction was made, comment is a string (including embedded spaces) describing the transaction, and amount is the amount of the transaction. The command determines what should be done to the balance with amount. The valid commands are
|
Read now
Unlock full access