Your import
file presumably looks something like this:
export LANG=en_US.UTF-8
export LC_CTYPE="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_MONETARY="en_US.UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_PAPER="en_US.UTF-8"
export LC_NAME="en_US.UTF-8"
export LC_ADDRESS="en_US.UTF-8"
export LC_TELEPHONE="en_US.UTF-8"
export LC_MEASUREMENT="en_US.UTF-8"
export LC_IDENTIFICATION="en_US.UTF-8"
export LC_ALL=
first of all, that's not an executable, so you can't just run it. In any case, what you want to do is source it, not execute it (see here for details ont he various ways of executing/sourcing a file). So you want to do . import
and not ./import
.
As for scripting it, here's a simple way:
locale | sed 's/^/export /' > import
scp import blablabla@hehehe:~/AFolder
ssh blablabla@hehehe
. import
import
file (taken from the remote host) – Yaron Jul 26 '17 at 10:15