02-22-2007
Hi,
The below script connecting to database and query the table put the o/p into file.
#!/bin/sh
var=""
file="/home/xx1/abc/filename.ext"
var=`$ORACLE_HOME/bin/sqlplus -s sd/sd@db1<<!
set feedback off;
set linesize 100;
select * from xx1;
!`
echo ${var}>>${file}
ORACLE
---------
select * from xx1
A B
P 123
Q 234
P 234
filename.ext in unix
------------------
P 123 Q 234 P 234
I want below format in that file
A B
P 123
Q 234
P 234
Please help
Thanks and Regards,
MR
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi to all,
Need help! For user sysoper on oracle, I want to know who and on which date/time the password has been modified? The platform is unix itself.
Thanks (2 Replies)
Discussion started by: ashvik
2 Replies
2. Shell Programming and Scripting
Hi,
I have a file whose content and format at places is as given below.
print
coloumn ....
coloumn ....
coloumn ....
skip 1 line
print
coloumn ...
skip 1 line
I need to select the following :
print
coloumn ....
coloumn ....
coloumn... (2 Replies)
Discussion started by: jisha
2 Replies
3. Shell Programming and Scripting
Hi All,
I need urgent help. Because just now i have to give this code to my client.
I have a folder name is Testing. this Testing folder contains the following 3 files.
1.txt
2.txt
2.txt
Now I want to store the first value of my folder in a variable say suppose $a.
Means i want that... (3 Replies)
Discussion started by: sunitachoudhury
3 Replies
4. Solaris
Hi all,
I wanted to know how to install oracle on solaris (b83)..
I also would like to know of a link that i can download oracle from?
please reply fast..
I need it for my exams day after tomorrow...
please reply (1 Reply)
Discussion started by: wrapster
1 Replies
5. UNIX for Advanced & Expert Users
hai ,
i want to connect to global ftp through ip address.
remote type is unix.
sometimes it is connecting some times connection timed out is coming
what is solution (1 Reply)
Discussion started by: rajan_ka1
1 Replies
6. UNIX for Dummies Questions & Answers
I am using a oracle query from unix..
flag=`sqlplus -s <<EOF
SELECT 'Y' FROM table_name
WHERE cond1 = '${table_name}'
AND DECODE('${var_a}','''NA''',own,'${var_b0}')= own
exception
when no_data_found then
dbms_output.put_line(NVL(l_owner_flag,'X'));
end;
EOF`
Its not validating the... (7 Replies)
Discussion started by: sivakumar.rj
7 Replies
7. Shell Programming and Scripting
Hi All,
I have a flat file like this on unix AIX server:
MXBOFO CSWP 5340 3794499 MXBOBIS CSWP 5340 3581124
MXBOFO CSWP 5340 3794531 MXBOBIS CSWP 5340 3583720
MXBOFO CSWP 5340 3794514 MXBOBIS CSWP 5340 3580763
MXBOFO CSWP 5340 3795578 MXBOBIS CSWP 5340 3794995
MXBOFO CSWP 5340 3710835... (3 Replies)
Discussion started by: unknown123
3 Replies
8. Red Hat
Hi Friends,
On one of my server which having direct connection to internet without firewall ..am seeing a established connection with SSH .. am not getting how ..there no login but I can see this established connection .
## have hidden original IPs with below notations for security concerns .... (0 Replies)
Discussion started by: Shirishlnx
0 Replies
9. Shell Programming and Scripting
I habe a UNIX Variablw with content as below:
WHOLE_REC_TXT="$record"
where $record contains contents of file
Sample contents of file:
topic_id|1624|AIDS-HIV||
topic_id|1625|Allergies||
topic_id|1626|Alzheimer s||
topic_id|1627|Knee Pain||
topic_id|1628|Autism||... (2 Replies)
Discussion started by: Arun Mishra
2 Replies
10. Shell Programming and Scripting
I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies
LEARN ABOUT REDHAT
ypserv.conf
YPSERV.CONF(5) Reference Manual YPSERV.CONF(5)
NAME
ypserv.conf - configuration file for ypserv and rpc.ypxfrd
DESCRIPTION
ypserv.conf is an ASCII file which contains some options for ypserv. It also contains a list of rules for special host and map access for
ypserv and rpc.ypxfrd. This file will be read by ypserv and rpc.ypxfrd at startup, or when receiving a SIGHUP signal.
There is one entry per line. If the line is a option line, the format is:
option: <argument>
The line for an access rule has the format:
host:domain:map:security
All rules are tried one by one. If no match is found, access to a map is allowed.
Following options exist:
files: 30
This option specifies, how many database files should be cached by ypserv. If 0 is specified, caching is disabled. Decreasing this
number is only possible, if ypserv is restarted.
trusted_master: server
If this option is set on a slave server, new maps from the host server will be accepted as master. The default is, that no trusted
master is set and new maps will not be accepted.
Example:
trusted_master: ypmaster.example.org
xfr_check_port: [<yes>|no]
With this option enabled, the NIS master server have to run on a port < 1024. The default is "yes" (enabled).
The field descriptions for the access rule lines are:
host IP address. Wildcards are allowed.
Examples:
131.234. = 131.234.0.0/255.255.0.0
131.234.214.0/255.255.254.0
domain specifies the domain, for which this rule should be applied. An asterix as wildcard is allowed.
map name of the map, or asterisk for all maps.
security
one of none, port, deny:
none always allow access.
port allow access if from port < 1024. Otherwise do not allow access.
deny deny access to this map.
FILES
/etc/ypserv.conf
SEE ALSO
ypserv(8), rpc.ypxfrd(8)
WARNINGS
The access rules for special maps are no real improvement in security, but they make the life a little bit harder for a potential hacker.
BUGS
Solaris clients don't use privileged ports. All security options which depend on privileged ports cause big problems on Solaris clients.
AUTHOR
Thorsten Kukuk <kukuk@suse.de>
YP Server October 2002 YPSERV.CONF(5)