root/bin/row @ 1505
1 |
#!/bin/bash
|
---|---|
2 |
# Gets a row of a spreadsheet. Designed for row #s in map error messages.
|
3 |
|
4 |
if ! test "$#" -eq 1; then |
5 |
echo "Usage: $0 row_num (zero-based, excluding header) <sheet >row_out" |
6 |
exit 2
|
7 |
fi
|
8 |
|
9 |
# Add 1 for header row and 1 for tail's 1-based row #s
|
10 |
tail -n +"$(($1+2))"|head -1 |