forked from PSLmodels/Tax-Calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
862f8c2
commit 0f1c1c7
Showing
10 changed files
with
66 additions
and
147 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
if [[ "$#" -ne 2 ]]; then | ||
echo "csvshow prints all non-zero CSV file column values for RECID" | ||
echo "ERROR: must specify exactly two command-line arguments" | ||
echo "USAGE: csvshow FILENAME RECID" | ||
exit 1 | ||
fi | ||
awk -F, ' | ||
BEGIN { | ||
recid_varnum = 0 | ||
} | ||
NR == 1 { | ||
for ( i = 1; i <= NF; i++ ) { | ||
varname[i] = $i | ||
if ( $i == "RECID" ) recid_varnum = i | ||
} | ||
} | ||
$recid_varnum == id { | ||
for ( i = 1; i <= NF; i++ ) { | ||
if ( $i != 0 ) { | ||
print i, varname[i], $i | ||
} | ||
} | ||
exit | ||
} | ||
' id=$2 $1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
if [[ "$#" -ne 1 ]]; then | ||
echo "csvvars prints all CSV file column numbers and names" | ||
echo "ERROR: number of command-line arguments not equal to one" | ||
echo "USAGE: csvvars FILENAME" | ||
exit 1 | ||
fi | ||
awk -F, ' | ||
NR == 1 { | ||
for( i = 1; i <= NF; i++ ) { | ||
print i, $i | ||
} | ||
' $1 |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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