Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # !/bin/awk
- BEGIN { total=0; RS = "END"; } {
- {
- if (match($1, "NAME")) {
- print $2;
- }
- if (match($1, "SAVE")) {
- total = total + ($2 * $3);
- print total;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement