Running Ubuntu 17.10 and I am having an issue running Postgres. It was working a couple weeks ago, but now I have this problem.
sudo su postgres psql
/usr/bin/psql: line 19: use: command not found
/usr/bin/psql: line 20: use: command not found
/usr/bin/psql: line 21: use: command not found
/usr/bin/psql: line 22: use: command not found
/usr/bin/psql: psql: line 24: syntax error near unexpected token `$version,'
/usr/bin/psql: psql: line 24: `my ($version, $cluster);'
I have no idea what to do, the syntax looks normal.
Try
sudo -u postgres psql
instead.
I actually do not know what your command does. A quick look to man su does not really clarify what su will do with extra arguments but obviously it is not starting psql, it is probably feeding the file contents to the shell.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With