Created
November 22, 2017 17:46
-
-
Save aprell/e0b06edf0278c47241a292011e2e97fe to your computer and use it in GitHub Desktop.
Reminder to strip off carriage returns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| A B C | |
| 1 2 3 | |
| 4 5 6 | |
| 7 8 9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/awk -f | |
| BEGIN { | |
| i = 0 | |
| } | |
| NR > 1 { | |
| A[i] = $1 | |
| B[i] = $2 | |
| C[i] = $3 | |
| i++ | |
| } | |
| END { | |
| for (j = 0; j < i; j++) { | |
| print "x", A[j], B[j], C[j], "y" | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is what we want:
This is what we get: