I'm using Linux 2.6.x.x.x
SUSE Linux Enterprise Server 10 (i586)
The question I want to know is how to pass a value through a pipe to a command ??
On every other operating system, including DOS
, I can use:
echo <value> | <command>
But on Linux
, this does not seem to work.
For example, I want to pass a Database Name
to an Oracle
command that sets Environment Variables
for the Database
based on what it reads from the oratab
file.
Normally, the command would run as:
. oraenv (to source environment variable settings)
Then, it would prompt you for the Database Name.
But, if I run: echo <some_db_name> | . oraenv
, it works without prompting and is useful in scripts on every platform except this version of Linux.
Any ideas?
$ <> /home/oracle>echo $SHELL
/bin/bash