Sponsored Content
Top Forums Shell Programming and Scripting Why am I getting spaces when there is none??!! Post 302084387 by tmarikle on Thursday 10th of August 2006 06:25:05 PM
Old 08-10-2006
Add SET LINESIZE 1000 to your parameter list. TRIMSPOOL ON will get rid of trailing spaces. Your line is being broken up by the default LINESIZE value.
Code:
{
param_data=`sqlplus -S user/pwd@db << EOF

SET lines 10   ECHO OFF NEWP 0 SPA 0 PAGES 0 FEED OFF HEAD OFF TRIMS ON

VARIABLE param_data VARCHAR2(1000);

WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK;

SELECT 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n'
 INTO :param_data
FROM dual;

EXIT;
EOF`
print $param_data
}
xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx

Code:
{
param_data=`sqlplus -S user/pwd@db << EOF

SET lines 1000   ECHO OFF NEWP 0 SPA 0 PAGES 0 FEED OFF HEAD OFF TRIMS ON

VARIABLE param_data VARCHAR2(1000);

WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK;

SELECT 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n'
 INTO :param_data
FROM dual;

EXIT;
EOF`
print $param_data
}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


Last edited by tmarikle; 08-10-2006 at 07:31 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Strip leading and trailing spaces only in a shell variable with embedded spaces

I am trying to strip all leading and trailing spaces of a shell variable using either awk or sed or any other utility, however unscuccessful and need your help. echo $SH_VAR | command_line Syntax. The SH_VAR contains embedded spaces which needs to be preserved. I need only for the leading and... (6 Replies)
Discussion started by: jerardfjay
6 Replies

2. UNIX for Dummies Questions & Answers

LS with spaces

Hi! I'm fairly new to UNIX so don't mention that my question is stupid. I have many problems with spaces in folders and files names. Let's say I have the following files: toto.txt this is toto.txt in /usr/local/this is a test/ Why the following commands works: ls "/usr/local/this... (2 Replies)
Discussion started by: darkyoda2
2 Replies

3. UNIX for Advanced & Expert Users

Trimming the spaces

Hi, How can I remove the unwanted spaces in the line. 123456 789 ABC DEF. - I wanna remove the sapces in this line, I need the output 123456789ABCDEF. Pls help me...... (3 Replies)
Discussion started by: sharif
3 Replies

4. UNIX for Dummies Questions & Answers

how to append spaces(say 10 spaces) at the end of each line based on the length of th

Hi, I have a problem where I need to append few spaces(say 10 spaces) for each line in a file whose length is say(100 chars) and others leave as it is. I tried to find the length of each line and then if the length is say 100 chars then tried to write those lines into another file and use a sed... (17 Replies)
Discussion started by: prathima
17 Replies

5. Shell Programming and Scripting

Remove Spaces

Hi All, I have a comma seperated file. I wanna remove the spaces from column 2. I mean i don't wanna remove the spaces those are presnt in column 1. ex: emp name, emp no, salary abc k, abc 11, 1000 00 bhk s, bhk 22, 2000 00 the output should be: emp name, emp no, salary abc k, abc11,... (4 Replies)
Discussion started by: javeed7
4 Replies

6. Shell Programming and Scripting

Removing blank spaces, tab spaces from file

Hello All, I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out. My file is like this (<b> means one blank space, <t> means one tab space)- $ cat file NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Discussion started by: NARESH1302
3 Replies

7. Shell Programming and Scripting

replace 2 spaces by one

Dear Friends, I have a flat file from which I want to remove single "space". And, wherever two spaces are provided it should replace it by only one space. E.g. I have N A T I O N A L E D U C A T I O N F O R O R G AN I S A T I ON S I want NATIONAL EDUCATION FOR ORGANISATIONS Please... (5 Replies)
Discussion started by: anushree.a
5 Replies

8. Shell Programming and Scripting

Spaces in variables

I'm having a problem with this.... --------------------------------------------------- #!/bin/bash SPKTAG=" | festival --tts" echo "Welcome to my shell program" "$SPKTAG"; --------------------------------------------------- I have a variable call SPKTAG " | festival --tts" and I... (2 Replies)
Discussion started by: digitalviking
2 Replies

9. Shell Programming and Scripting

Spaces

Input: TCAMPBMG0064X344F4E1 1 47552 85.280 557.600 11300 TCAMPBMG0064X352F8E1 1 61265 85.280 718.400 11463 TCAMPBMG0064X344F4E1 1 47552 85.280 557.600 11300 TCAMPBMG0064X352F8E1 1 61265 ... (2 Replies)
Discussion started by: satish1222
2 Replies

10. Shell Programming and Scripting

How to avoid the spaces?

Hi I have a script which runs the isql command and takes the output in a xls file. Is there a way to trim the spaces(leading and trailing) from all the values in the column of the xls sheet? (6 Replies)
Discussion started by: Sharma331
6 Replies
COLORGCCRC(5)							File Formats Manual						     COLORGCCRC(5)

NAME
colorgccrc - configuration file for colorgcc DESCRIPTION
A colorgccrc configuration file is used to configure the highlighting of the compiler output from colorgcc. SYNTAX
Each line consists of a keyword designating a configuration variable. The keyword is followed by `:' and then one or several values (depending on the keyword). Lines beginning with a hash mark `#' are comments. CONFIGURATION VARIABLES
g++ | gcc | c++ | cc | g77 | gcj | gnat | gpc Specifies the paths to the compilers. Takes one value; a path to the compiler. nocolor Specifies what terminal types colorization should be disabled on. Takes one or several values, separated by whitespace. srcColor Specifies the highlighting attributes source-code should be given. Takes one or several color attributes. See the section COLOR ATTRIBUTES for more information. introColor Specifies the highlighting attributes for normal compiler output. Takes one or several color attributes. See the section COLOR ATTRIBUTES for more information. warningFileNameColor | errorFileNameColor Specifies the highlighting attributes for the filename in a warning or an error, respectively. Takes one or several color attributes. See the section COLOR ATTRIBUTES for more information. warningNumberColor | errorNumberColor Specifies the highlighting attributes for the line-number in a warning or an error, respectively. Takes one or several color attributes. See the section COLOR ATTRIBUTES for more information. warningMessageColor | errorMessageColor Specifies the highlighting attributes for the message-text in a warning or an error, respectively. Takes one or several color attributes. See the section COLOR ATTRIBUTES for more information. COLOR ATTRIBUTES
The following attributes are valid for highlighting. clear, reset bold, underline, underscore, blink, reverse, concealed black, red, green, yellow, blue, magenta, cyan, white on_black, on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, on_white SEE ALSO
gcc(1), colorgcc(1) HISTORY
Jan 15 2003: Initial version of this manual-page. REPORTING BUGS
Report bugs to <jmoyers@geeks.com> AUTHORS
Jamie Moyers <jmoyers@geeks.com> is the author of colorgcc. This manual page was written by Joe Wreschnig <piman@sacredchao.net>, and modified by David Weinehall <tao@debian.org>, for the Debian GNU/Linux system (but may be used by others). COPYRIGHT
Copyright (C) 2003 Jamie Moyers This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. Jan 15, 2003 COLORGCCRC(5)
All times are GMT -4. The time now is 09:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy