public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jeff Frost <[email protected]>
To: Simon Riggs <[email protected]>
Cc: [email protected]
Subject: Re: psql man page error?
Date: Tue, 5 Dec 2006 09:22:36 -0800 (PST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

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 	<[email protected]>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954



view thread (17+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: psql man page error?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox