From: | Jeff Frost <jeff(at)frostconsultingllc(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | pgsql-docs(at)postgresql(dot)org |
Subject: | Re: psql man page error? |
Date: | 2006-12-05 17:22:36 |
Message-ID: | Pine.LNX.4.64.0612050914320.3166@glacier.frostconsultingllc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Tue, 5 Dec 2006, Simon Riggs wrote:
> which gives
>
> prompt> echo "\x \\ select * from foo;" | psql
> Expanded display is on.
> invalid command \
>
> i.e. doesn't work on bash. With bash the command should be:
>
> echo -e "\x \n select * from foo;" | psql
>
> which gives
>
> prompt> echo -e "\x \n select * from foo;" | psql
> Expanded display is on.
> ERROR: relation "foo" does not exist
>
> Does this mean there are multiple forms of the echo command, or is this
> example just wrong?
I believe that /bin/echo and the bash built-in used to be slightly different,
although reviewing both man pages on my FC5 system seem to indicate that they
have the same command-line arguments.
It's also possible that I'm thinking back to my Solaris (2.5.1) days when the
built-in tcsh echo was in fact different than /bin/echo. That's why all my
scripts seem to call the binary and not the built-in.
Another possibility is that the original author had the options set in his
xpg_echo environment variable and forgot about it...or his distro was setting
it in a profile.d file.
--
Jeff Frost, Owner <jeff(at)frostconsultingllc(dot)com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-12-05 17:41:00 | Re: psql man page error? |
Previous Message | Tom Lane | 2006-12-05 16:03:33 | Re: FOR SHARE vs FOR UPDATE locks |