issue with the query output in unix


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting issue with the query output in unix
# 1  
Old 12-18-2009
issue with the query output in unix

I am running a query with contains blank spaces in between in the output. But when I open and read the file in UNIX i am not able to cursor the balnk spaces instead it is moving like tabs. Please help

suppose my query -

Code:
 
Select '  '||text from tab1;

the cursor should move to 1st and 2nd blank space but it is directly moving to text field trating the blank space as tabs.

Last edited by zaxxon; 12-18-2009 at 05:53 AM.. Reason: use code tags please
# 2  
Old 12-18-2009
Are you sure it is actually blank space?

If you are using vim, do ":l" to see the line,

Code:
                Leading spaces
                Leading tabs
:.,.+1l

                Leading spaces$
^I^ILeading tabs$

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I want query output to send on mail using table tag and output should be in table

#! /bin/ksh #] && . ./.profile 2>/dev/null if test -f '.profile'; then . ./.profile; fi; #. .profile LOG_DIR=/app/rpx/jobs/scripts/just/logs sendEmail() { pzCType="$1"; pzTitle="$2"; pzMsg="$3"; pzFrom="$4"; pzTo="$5"; pzFiles="$6"; pzReplyTo="$7" ( ... (21 Replies)
Discussion started by: ankit.mca.aaidu
21 Replies

2. UNIX for Dummies Questions & Answers

Maximum of the values from the output a query

Following is the output of a command ran inside the script: 2015-01-29-05-38-02 5 2015-01-29-05-38-02 5 2015-01-29-05-38-02 5 2015-01-29-05-38-02 5 2015-01-29-05-38-02 5 2015-01-29-05-38-03 5 2015-01-29-05-38-03 5 2015-01-29-05-38-03 5 2015-01-29-05-38-03 5 2015-01-29-05-38-03 5... (8 Replies)
Discussion started by: Devendra Hupri
8 Replies

3. Shell Programming and Scripting

SQL query in UNIX script - output in flat file

Hi, I never did this before... what I want to do is execute a SQL query from a unix script and redirect sql query's output to a flat file (comma separated one) without the header info (no column names). I would also want not to print the query's output to the screen. snapshot of my script:... (13 Replies)
Discussion started by: juzz4fun
13 Replies

4. UNIX for Dummies Questions & Answers

UNIX Query About wc -l output

I was performing the wc -l operation in one data file the result is less when i was giving -nu on the view of the file. while giving wc -l the count is 5023 after setting line numbers in view of file is giving 5024. Can anyone help on this.... (5 Replies)
Discussion started by: abhii
5 Replies

5. Shell Programming and Scripting

Printing the output of a db2 query on to an unix file

I want to print the output of a db2 query, on to an unix file in a manner that the columns are separated by 'commas'. Please help me out..thanx in advance (1 Reply)
Discussion started by: prasan_ven
1 Replies

6. Solaris

awk output query

Hi Everyone, When i issue command like ls -l | awk '/udtts/ {print $9}' =============================== I am getting output as udttsGEHLNAR.6864 udttsGEHLNAR.7921 udttsNARALAX.15415 udttsNARALAX.18016 But I want output after dot i.e like 6864 7921 15415 18016 (3 Replies)
Discussion started by: gehlnar
3 Replies

7. Shell Programming and Scripting

add the output of a query to a variable to be used in another query

I would like to use the result of a query in another query. How do I redirect/add the output to another variable? $result = odbc_exec($connect, $query); while ($row = odbc_fetch_array($result)) { echo $row,"\n"; } odbc_close($connect); ?> This will output hostnames: host1... (0 Replies)
Discussion started by: hazno
0 Replies

8. UNIX and Linux Applications

mysql query browser issue

Hi, I'm new to mysql, I've installed MYSQL on our unix server and started MYSQL on this server. I've now downloaded MYSQL Query Browser, when I try to connect to MYSQL server, I get the following error "could not connect to the specified instance" - MySQL Error Number 1130. From the... (3 Replies)
Discussion started by: venhart
3 Replies

9. Shell Programming and Scripting

need help in reading a output of a sql query in unix script

i'm used a sql query in a unix script to get the information from table. but unable to extract the output which i need. Any help with logic will be greatly appreciated. my sql query provide output some thing like this - col1 col2 count ---- ---- ------ A B 10 c D 6 e... (8 Replies)
Discussion started by: pharos467
8 Replies

10. Shell Programming and Scripting

To spool output from a database query

Hi all, I would want to spool file for a database query, however by using crontab, the file is not spooled. Below shows my script: ORACLE_HOME="/u01/oraprod/perpdb/10.1.0/db_1" OUTFILE="/tmp/invalid.out" FILE="$HOME/admin/scripts" $ORACLE_HOME/bin/sqlplus -s "/as sysdba"... (0 Replies)
Discussion started by: *Jess*
0 Replies
Login or Register to Ask a Question