Need the line to be printed in single line


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need the line to be printed in single line
# 1  
Old 01-08-2010
Need the line to be printed in single line

Hi,

I have my code like this

Code:
v_site_eli=`sqlplus -s<<-EOsqlplus
$SQL_USERNAME/$SQL_PASSWD
WHENEVER SQLERROR EXIT SQL.SQLCODE
WHENEVER OSERROR EXIT FAILURE
SET TERM OFF
SET HEAD OFF
SET VERIFY OFF
SET FEEDBACK OFF
declare
VARIABLE vn_return_sts varchaR2(6);
begin
SELECT SITE_ELGBLTY_CD into vn_return_sts FROM LOCATION WHERE LOCATION_ID=3508;
endEXIT &vn_return_sts;
EOsqlplus`
file_name="$TRU_TO_ASSURED_FILE_FMT_PREFIX$CURTIME$2COUNTRY_CODE$v_site_eli$TRU_TO_ASSURED_FILE_FMT_SUFFIX"


Now my problem is the last line file_name="....."

it is printing my $v_site_eli$TRU_TO_ASSURED_FILE_FMT_SUFFIX" this o/p in separate line in need this in single line along with the rest of the line above..

Code:
file_name="$TRU_TO_ASSURED_FILE_FMT_PREFIX$CURTIME$2COUNTRY_CODE$v_site_eli$TRU_TO_ASSURED_FILE_FMT_SUFFIX"

NOW O/P:
Code:
..File FTPd....OUT_DIR/ta_item_2010-01-08070313can
TRUCAN.cadcprod_itm

Expected O/P format:


Code:
File FTPd....OUT_DIR/ta_item_2010-01-08070313canTRUCAN.cadcprod_itm


body { margin: 0 0 0 0; padding:0 0 0 0 }td,div { font-family:Tahoma;font-size:8pt;vertical-align:top }body { margin: 0 0 0 0; padding:0 0 0 0 }.transcript { background-color:#d2d2d2; }.messageBlock { margin-left:4px; margin-bottom:3px }.message { margin-left:100px; word-wrap:break-word; white-space:-moz-pre-wrap; _white-space:pre; }.messageCont { margin-left:100px; word-wrap:break-word; white-space:-moz-pre-wrap; _white-space:pre;}.other { color:#39577a;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }.myself { color:#da8103;font-style:normal;font-weight:bold;font-style:normal;float:left; width:95px; }.otherCont { font-size:8px;text-align:right; color:#39577a;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }.myselfCont { font-size:8px;text-align:right; color:#da8103;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }.system { margin-left:4px; word-wrap:break-word;color:#da8103;font-style:normal;font-weight:normal; white-space:-moz-pre-wrap; _white-space:pre; }.showTimestamp { margin-right:3px; float:right; color:#999999;font-style:normal;font-weight:normal; }.other1 { color:#ac2000;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }.otherCont1 { font-size:8px;text-align:right; color:#ac2000;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }.other2 { color:#3c9fa8;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }.otherCont2 { font-size:8px;text-align:right; color:#3c9fa8;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }.other3 { color:#e25614;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }.otherCont3 { font-size:8px;text-align:right; color:#e25614;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }.other4 { color:#0b6ac8;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }.otherCont4 { font-size:8px;text-align:right; color:#0b6ac8;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }.other5 { color:#b23290;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }.otherCont5 { font-size:8px;text-align:right; color:#b23290;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }.other6 { color:#02e7c7;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }.otherCont6 { font-size:8px;text-align:right; color:#02e7c7;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }.other7 { color:#5b3284;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }.otherCont7 { font-size:8px;text-align:right; color:#5b3284;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }.tsDisplay { display:block }

Please help me out.. little bit urgent.. iam stuck here

Thanks and regards
Jk

Last edited by pludi; 01-08-2010 at 08:40 AM.. Reason: code tags, please...
# 2  
Old 01-09-2010
Try without quotes
Quote:
file_name=$TRU_TO_ASSURED_FILE_FMT_PREFIX$CURTIME$2COUNTRY_CODE$v_site_eli$TRU_TO_ASSURED_FILE_FMT_S UFFIX
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Multi line log files to single line format

I want to read the log file which was generate from other command . And the output was having multi line in log files for job name and server name. But i need to make all the logs on one line Source file 07/15/2018 17:02:00 TRANSLOG_1700 Server0005_SQL ... (2 Replies)
Discussion started by: ranjancom2000
2 Replies

2. Shell Programming and Scripting

Perl command line option '-n','-p' and multiple files: can it know a file name of a printed line?

I am looking for help in processing of those options: '-n' or '-p' I understand what they do and how to use them. But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.) I did try it and -n works on 2 files. Question is: - is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies

3. 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

4. UNIX for Dummies Questions & Answers

How to get " printed on command line?

Hey, Is there a way I can print " in a command line? When I type "echo "set variable = disco"".... This actually prints echo set variable = disco but I would like to print it out as --- echo "set variable = disco" Thanks, Satya (4 Replies)
Discussion started by: Indra2011
4 Replies

5. UNIX for Dummies Questions & Answers

To find and display the middle line in a file using single line command.

Hi all, How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies

6. Shell Programming and Scripting

sed command to grep multiple pattern present in single line and delete that line

here is what i want to achieve.. i have a file with below contents cat fileName blah blah blah . .DROP this REJECT that . --sport 7800 -j REJECT --reject-with icmp-port-unreachable --dport 7800 -j REJECT --reject-with icmp-port-unreachable . . . more blah blah blah --dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies

7. Shell Programming and Scripting

Formatting File having big single line into 95 Char Per Line

Hi All, I have 4 big files which contains one big line containing formatted character records, I need to format each file in such way that each File will have 95 Characters per line. Last line of each file will have newline character at end. Before:- File Name:- File1.dat 102 121340560... (10 Replies)
Discussion started by: lancesunny
10 Replies

8. 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

9. UNIX for Dummies Questions & Answers

Python update already printed line.

Hi. I have a basic script in python that outputs like this.. $ ./test.py 1% 2% 3% 4% 5% 6% 7% 8% 9% 10% ... But how can I make it so the output stays in 1 line? So it would look something like this.. $ ./test.py 10% (1 Reply)
Discussion started by: cbreiny
1 Replies

10. 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
Login or Register to Ask a Question