☆ Ask an AWK script format!

xiaoxiao2021-03-05  24

Mike Harrington: (510) 548-1278: 250: 100: 175

Christian Dobbins: (408) 538-2358: 155: 90: 201

Susan Dalsass: (206) 654-6279: 250: 60: 50

Archie McNichol: (206) 548-1348: 250: 100: 175

JODY SAVAGE: (206) 548-1278: 15: 188: 150

Guy Quigley: (916) 343-6410: 250: 100: 175

Dan Savage: (406) 298-7744: 450: 300: 275

Nancy Mcnell: (206) 548-1278: 250: 80: 75

John Goldenrod: (916) 348-4278: 250: 100: 175

CHET MAIN: (510) 548-5258: 50: 95: 135

Tom Savage: (408) 926-3456: 250: 168: 200

Elizabeth Stachelin: (916) 440-1763: 175: 75: 300

The recorded content of this database includes name, phone number, and finalized donation data in the last 3 months, saving the above data as Donation. This is my UNIX job: write a AWK script called FACTS, complete the following: Print Savages and phone numbers; print the amount of donation of the CHET; print all the first month of $ 250. I have written an awk script: / sagage / {Print $ 1, $ 2, "Phone Number:" $ 3} $ 4 ~ / 250 / {Print "donated $ 250 for the first month:" $ 1, $ 2} / chet / { Print "CHET's donation): $ 4" $ "$ 5" $ 6} Saved as awksc, running awk -f 'in Cygwin [:] -f awksc donation display results as follows: ask! How to display the correct format? (It is to look into a mess! Little student beginner Linux ~ ^ - ^! I hope I don't know!

转载请注明原文地址:https://www.9cbs.com/read-36056.html

New Post(0)