I have a list of commands I would like to paste into the terminal so that they run one after the other.
Initially they run fine, but commands later on are being truncated.
Example command:
ogr2ogr -nlt PROMOTE_TO_MULTI -progress -skipfailures -overwrite -lco PRECISION=no -f PostgreSQL PG:"dbname='natural_earth' host='localhost' port='5432' user='natural_earth' password='natural_earth'" 50m_physical/ne_50m_lakes.shp
There are about 150 of these commands, they are stored in gedit with line wrapping off and are being pasted as a block straight into the terminal.
Expected result:
$ ogr2ogr -nlt PROMOTE_TO_MULTI -progress -skipfailures -overwrite -lco PRECISION=no -f PostgreSQL PG:"dbname='natural_earth' host='localhost' port='5432' user='natural_earth' password='natural_earth'" 50m_physical/ne_50m_lakes.shp
0...10...20...30...40...50...60...70...80...90...100 - done.
This works for about the first 30 commands, after which I get a varying level of truncation on the commands, for example:
$ ogr2o
ogr2o: command not found
$ ogr
ogr: command not found
$ ogr2ogr -nlt PROMOTE_TO_MULTI -progress -skipfailures -overwrite -lco PRECISION=no -f PostgreSQL PG:"dbname='natural_earth' host='localhost' port='5432' user='natural_earth' password='natural_earth'" 50m_physical/ne_50m_graticules_all/ne_50m_grati
FAILURE:
Unable to open datasource `50m_physical/ne_50m_graticules_all/ne_50m_grati'
So I am new to Linux. I was wondering if there was a better way to run these than copy & paste from gedit?
I am running Linux Mint 15 "olivia" Cinnamon 32-bit.
sh [filename]
. – goldilocks Sep 25 '13 at 20:32