Last change
on this file since 34501 was 34495, checked in by davidb, 4 years ago |
Refactored and adjusted for new location of file
|
-
Property svn:executable
set to
*
|
File size:
544 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | head_n_arg=${1:-100}
|
---|
4 |
|
---|
5 | # cp ../../../../../../waikato-independent-db/WAIKATO_INDEPENDENT.csv import.holding/.
|
---|
6 |
|
---|
7 | input_csv_file="pre-import/MSAccessToCSV/WAIKATO_INDEPENDENT.csv"
|
---|
8 | output_csv_file="import/wi-head${head_n_arg}.csv"
|
---|
9 |
|
---|
10 | if [ ! -f $input_csv_file ] ; then
|
---|
11 | echo "Error: Failed to find $input_csv_file to generate sample CSV file in 'import'" >&2
|
---|
12 | exit 1
|
---|
13 | fi
|
---|
14 |
|
---|
15 | echo "Generating CSV sample from head 1..$head_n_arg"
|
---|
16 | echo " $input_csv_file -> $output_csv_file"
|
---|
17 |
|
---|
18 | head -n $head_n_arg "$input_csv_file" > "$output_csv_file"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.