source: main/trunk/model-sites-dev/cambridge-museum/collect/waikato-independent/PREPARE-FOR-IMPORT.sh@ 34501

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
3head_n_arg=${1:-100}
4
5# cp ../../../../../../waikato-independent-db/WAIKATO_INDEPENDENT.csv import.holding/.
6
7input_csv_file="pre-import/MSAccessToCSV/WAIKATO_INDEPENDENT.csv"
8output_csv_file="import/wi-head${head_n_arg}.csv"
9
10if [ ! -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
13fi
14
15echo "Generating CSV sample from head 1..$head_n_arg"
16echo " $input_csv_file -> $output_csv_file"
17
18head -n $head_n_arg "$input_csv_file" > "$output_csv_file"
Note: See TracBrowser for help on using the repository browser.