Home » Infrastructure » Unix » Blank Space problem in unix
Blank Space problem in unix [message #140426] Tue, 04 October 2005 03:29 Go to next message
muralish
Messages: 2
Registered: October 2005
Junior Member
Hi,

This my query

TMP_FILE=/export/home/test.txt
`sqlplus -s username/password@instance <<EOF > ${TMP_FILE}

SET TRIMSPOOL OFF

select sysdate||' ' from dual;

exit

EOF`

The above Script works fine (with correct number of spaces succeeding the sysdate )in my colleague's machine working in a different database on UNIX environment.When it is tried in my machine with SUN Solaris OS V5.8 the space suceeding the sysdate is ignored.Iam unable to move the cursor after the sysdate.This has been checked using vi editor.

NOTE: The script produces exact number of spaces when run using TOAD,Sqlplus etc.,
Number of spaces 8..

Please help

TIA,
Murali

[Updated on: Tue, 04 October 2005 03:31]

Report message to a moderator

Re: Blank Space problem in unix [message #140432 is a reply to message #140426] Tue, 04 October 2005 03:59 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Working as intended.
oracle@mutation#`sqlplus -s scott/tiger <<EOF > ${TMP_FILE}
> SET TRIMSPOOL OFF
> select sysdate regular, length(sysdate) "regular length", sysdate||' ' new, length(sysdate||' ') "new length" from dual;
> exit
> EOF`
oracle@mutation#cat $TMP_FILE

REGULAR   regular length NEW        new length
--------- -------------- ---------- ----------
04-OCT-05              9 04-OCT-05          10
Re: Blank Space problem in unix [message #141001 is a reply to message #140432] Thu, 06 October 2005 10:02 Go to previous message
muralish
Messages: 2
Registered: October 2005
Junior Member
Hi,

Thanks for ur replay.
It's every thing is correct as per u said.
But i am not able to move the cursor in spaces(which i create spaces)

Regards,
Murali
Previous Topic: how to know file system from iostat output..
Next Topic: Problem with AWK in formating the data
Goto Forum:
  


Current Time: Tue Apr 16 10:57:29 CDT 2024