Sponsored Content
Top Forums Shell Programming and Scripting Output coming in different line instead of single line Post 302345073 by mac4rfree on Tuesday 18th of August 2009 11:06:53 AM
Old 08-18-2009
Output coming in different line instead of single line

Hi Guys,

I have an oracle database, I am trying to query the database and route it to file.

But the records instead of coming in a single line, are coming in three lines.

Can you please help me.. in this..

Code:
sqlplus -s $SRMUserid/$SRMPassword@$SRMServer<< EOF >log.out;
select * from cisdba.s_rot where rownum=1;
exit
EOF
>cat log.out

    OBJ_ID   CLASS_ID   OBJ_TYPE S S_ROT_TIME_ S_ROT_USR_ID S_ROT_IS_PRIVATE
---------- ---------- ---------- - ----------- ------------ ----------------
S_ROT_OBJ_TEMPL_PTR BOTTOM_CLASS_ID S_ROT_CREATE_USR_ID S_ROT_ATT_COUNT
------------------- --------------- ------------------- ---------------
S_ROT_NOTE_COUNT S_ROT_CREAT S_ROT_TEMPLATE_KEY   S_SITEM_OWNER_GROUPSS
---------------- ----------- -------------------- ---------------------
    168634        120          1 C 19-MAR-2001        52001                0
                                120               52001               0
               0 19-MAR-2001

It should be
Code:
   OBJ_ID   CLASS_ID   OBJ_TYPE S S_ROT_TIME_ S_ROT_USR_ID S_ROT_IS_PRIVATE S_ROT_OBJ_TEMPL_PTR BOTTOM_CLASS_ID S_ROT_CREATE_USR_ID S_ROT_ATT_COUNT S_ROT_NOTE_COUNT S_ROT_CREAT S_ROT_TEMPLATE_KEY   S_SITEM_OWNER_GROUPSS
---------- ---------- ---------- - ----------- ------------ ----------------------------------- --------------- ------------------- ------------------------------- ----------- -------------------- ---------------------
    168634        120          1 C 19-MAR-2001        52001                0            120               52001               0               0 19-MAR-2001

Thanks for your help..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Multi-line output to single line

Hello, How can I take the following output: outputa outputb outputc and turn it into single line ouput, with a single space between each field like below: outputa outputb outputc (7 Replies)
Discussion started by: LinuxRacr
7 Replies

2. AIX

ls command output in single line

Hi, Can anyone suggest me how can I display the output of ls command in single line with some delimiter say pipe (|)? I know it can be done by writing a script by using the loops but I wanted to know are there any other single line commands? Thanks for your help Sheshadri (7 Replies)
Discussion started by: arsheshadri
7 Replies

3. Shell Programming and Scripting

single line input to multiple line output with sed

hey gents, I'm working on something that will use snmpwalk to query the devices on my network and retreive the device name, device IP, device model and device serial. I'm using Nmap for the enumeration and sed to clean up the results for use by snmpwalk. Once i get all the data organized I'm... (8 Replies)
Discussion started by: mitch
8 Replies

4. Shell Programming and Scripting

Output to be in single line

Hi All, Small script but :wall:, please help in this regard. for i in 1 2 3 do echo $i done result : 1 2 3 I want the above to be printed as below expected result: 1 2 3 Thanks in advance :) (3 Replies)
Discussion started by: girish_satyam
3 Replies

5. Shell Programming and Scripting

Merge multi-line output into a single line

Hello I did do a search and the past threads doesn't really solve my issue. (using various awk commands) I need to combine the output from java -version into 1 line, but I am having difficulties. When you exec java -version, you get: java version "1.5.0_06" Java(TM) 2 Runtime... (5 Replies)
Discussion started by: flagman5
5 Replies

6. Shell Programming and Scripting

Joining multi-line output to a single line in a group

Hi, My Oracle query is returing below o/p ---------------------------------------------------------- Ins trnas value a lkp1 x a lkp1 y b lkp1 a b lkp2 x b lkp2 y ... (7 Replies)
Discussion started by: gvk25
7 Replies

7. Shell Programming and Scripting

Output to single line

Hi, I am using below command and getting below output. echo "dis ql(*) CLUSTER"|runmqsc CT.QM.ASSA10T1| egrep 'QUEUE|CLUSTER'|egrep -v 'SYSTEM|XMITQ'| sed -e 's/QUEUE(/ /g' -e 's/TYPE(QLOCAL)/ /g' -e 's/CLUSTER(/ /g' -e 's/)/ /g' output CT.CL.ALLUHUB.FLST_TO_HUB_PROV.01... (20 Replies)
Discussion started by: darling
20 Replies

8. Shell Programming and Scripting

convert single line output to multiple line

Hi all, I have a single line output like below echo $ips 10.26.208.28 10.26.208.26 10.26.208.27 want to convert above single line output as below format. Pls advice how to do ? 10.26.208.28 10.26.208.26 10.26.208.27 Regards Kannan (6 Replies)
Discussion started by: kamauv234
6 Replies

9. UNIX for Beginners Questions & Answers

Output to file print as single line, not separate line

example of problem: when I echo "$e" >> /home/cogiz/file.txt result prints to file as:AA BB CC I need it to save to file as this:AA BB CC I know it's probably something really simple but any help would be greatly appreciated. Thank You. Cogiz (7 Replies)
Discussion started by: cogiz
7 Replies

10. UNIX for Beginners Questions & Answers

Get an output of lines in pattern 1st line then 10th line then 11th line then 20th line and so on.

Input file: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies
NRPARMS(8)						   Linux System Managers Manual 						NRPARMS(8)

NAME
nrparms - Configure the NET/ROM interface. SYNOPSIS
nrparms -nodes node +|- ident quality count port neighbour [digicall...] nrparms -routes port nodecall [digicall...] +|- quality nrparms -version DESCRIPTION
This program is used to manipulate the routing tables of the NET/ROM network layer, or to get and set many of the network and transport layer parameters for the NET/ROM protocol. The program has three basic modes of operation, node setting, neighbour setting and general parameter setting. The syntax for the node and neighbour setting is taken from the original NET/ROM manual and is therefore not very UNIXy but should be familiar to those familiar with NET/ROMs or TheNet. To set up a new route to a NET/ROM node in the routing tables you must use the nodes option. All of the parameters are needed to add the node. It is probably best to illustrate with an example: nrparms -nodes GB7BPQ + NMCLUS 120 6 vhf G8ROU-3 This creates a new route to a distant node with the callsign GB7BPQ and the alias NMCLUS, it has a quality of 120 (out of 255) and has an obsolescence count of six and packets for that node should be sent on the AX.25 port named vhf to my immediate neighbour G8ROU-3. The call- signs of the node and the neighbour may be the same. For example to set up the node G8ROU-3 which is also my immediate neighbour, I would use: nrparms -nodes G8ROU-3 + MATLCK 200 6 vhf G8ROU-3 If the ident of the remote node is not known, it is possible to add a node with a blank ident. To do this an ident of '*' must be entered on the command line. Because of the command line expansion that shells do, the * must be escaped by enclosing it in quotes. It is also possible to remove a route to a distant node with the same command except that the + is replaced by a -. The other parameters must also be present. If the node has not other routes then the node will be deleted, and the neighbour node that the connections go via may also be deleted if no other node route uses it, and it is not a locked neighbour entry. When setting up a new node, a new neighbour entry may also be created. This will have a default value. For that neighbour to be meaningful in the automatic routing process, it must have a more reasonable entry in the neighbours list. To do this the routes option of the command must be used. An example: nrparms -routes ax0 G8ROU-3 + 120 This will create (or update) the neighbour entry for G8ROU-3 with a quality of 120 and it will be locked, it will not create a node entry for the neighbour. This quality will be used by the netromd(8) program when calculating route qualities via this neighbour. Normally once a neighbour has zero node routes going via it, it will be deleted. Locking a neighbour prevents the deletion from occurring. To unlock a neighbour entry, the same command is used but with the + replaced by a -. FILES
/etc/ax25/axports /etc/ax25/nrports SEE ALSO
call(1), netrom(4), nrports(5), axparms(8), netromd(8), nrparms(8). AUTHOR
Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk> Linux 25 January 1997 NRPARMS(8)
All times are GMT -4. The time now is 07:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy