unix script errors


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers unix script errors
Prev   Next
# 1  
Old 10-28-2005
unix script errors

#!/bin/ksh


sqlplus -s user/passwd@remoteserver << EOF > errors2.log

set pagesize 0 feedback off verify off heading off echo off

select directory_nm || '/' || file_nm || '|' ||venue_id || '|' || time_id from file_control;
EOF


The output of this script is;

/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050713211544.20051025.20050713211544|
28991|1130198400

/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050713211544.20051025.20050713211544|
25881|1130198400

/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050711210100.20051025.20050711210100|
25881|1130198400

/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050711210100.20051025.20050711210100|
28991|1130198400


The desired output is: the directory_nm, filename,venueid and timeid must be in the same line.

/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050713211544.20051025.20050713211544|28991|1130198400
/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050713211544.20051025.20050713211544|25881|1130198400
/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050711210100.20051025.20050711210100|25881|1130198400
/mnt/datagridx/MKG/perm/testdata/DSA.WLG.20050711210100.20051025.2005071121010028991|1130198400

Can you tell me why the output from the korn script is printing in 2 lines instead of single line. I tried to debug it could not.

can anyone hep me please.

Thanks
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting Sysdate-1 ORA Errors - Can you help me in this UNIX Script?

Hi Guys, I wanted to create an Unix Shell Script that should fetch a particular string from a text file on a particular date. We all know Oracle generates alert logs for each and every day for every actions in the database. I have an alert log file now where it contains for about a months... (4 Replies)
Discussion started by: raja_dba
4 Replies

2. Shell Programming and Scripting

need help with ksh script errors

#!/bin/ksh number1="20" if then number1=$1 fi number2="1" while ] do if ] then print "FizzBuzz" elif ] then print "Fizz" elif ] then ... (3 Replies)
Discussion started by: bjhum33
3 Replies

3. UNIX for Dummies Questions & Answers

How to ignore errors in script

I have a simple script that processes files. Here's a simplified example of what I'm doing: foreach t (web.*) mv $t dnw$t:e.log end foreach t (card.*) mv $t card$t:e.log end The problem is that sometimes there is no web.* file. In that case, I get an error "foreach: No match" and... (4 Replies)
Discussion started by: software5723
4 Replies

4. Shell Programming and Scripting

Help with execution errors in script

solution found.... Please use tags for scripts, listings, and console output (2 Replies)
Discussion started by: audiolord
2 Replies

5. Shell Programming and Scripting

Help with shell script errors

hey watsup guys i am new in the shell script world. so i need help fom you guys, i have written these two codes and they both give the same errors( expr : syntax error). Code 1 : #! /bin/sh # count1 appends an increment to a file 200 times # note that a file called numbers must be... (5 Replies)
Discussion started by: surubi_abada
5 Replies

6. Shell Programming and Scripting

Script to capture errors

Hello; I'm trying to write a script to capture any hardware error from logs/syslog on my SUSE 10 servers so i can be notified if we have any hardware issues such a bad fan or battery, etc.. Thanks in advance for any help (2 Replies)
Discussion started by: Katkota
2 Replies

7. Shell Programming and Scripting

how to handle sql loader errors in unix

hi all, how to handle sql loader errors in unix shell ?? thanks in advance gemini (3 Replies)
Discussion started by: gemini106
3 Replies

8. UNIX for Advanced & Expert Users

Bash/Unix Command Errors

Hi all, I have major errors on entering the shell. On login I get: -bash: dircolors: command not found -bash: tr: command not found -bash: fgrep: command not found -bash: grep: command not found -bash: grep: command not found -bash: id: command not found -bash: # root@host # pwd /bin... (0 Replies)
Discussion started by: wcmmlynn
0 Replies

9. Programming

Errors while Compiling a PC script.

Hi all, I have created a post-C (PC) script OrdItmpopulate.pc. When I am compiling this using the “Make” command I am getting the following error. My “make” command looks like this: make -f $ORACLE_HOME/precomp/demo/proc/demo_proc.mk build EXE=OrdItmpopulate8.exe OBJS="OrdItmpopulate8.o"... (1 Reply)
Discussion started by: musavir19
1 Replies

10. Shell Programming and Scripting

checking for script errors

ok, i have a script which i use to search my process' for specific keywords and kill any process containing them. there is a prompt to enter a keyword for searching and another prompt for which user you want to search the process' of. i want the script to have something that if you entered a search... (1 Reply)
Discussion started by: Blip
1 Replies
Login or Register to Ask a Question
pagesize(1)							   User Commands						       pagesize(1)

NAME
pagesize - display the size or sizes of a page of memory SYNOPSIS
/usr/bin/pagesize [-a] DESCRIPTION
The pagesize utility prints the default size of a page of memory in bytes, as returned by getpagesize(3C). This program is useful in con- structing portable shell scripts. OPTIONS
The following option is supported: -a Prints out all possible hardware address translation sizes supported by the system. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
ppgsz(1), getpagesize(3C), getpagesizes(3C), attributes(5) SunOS 5.10 4 May 2001 pagesize(1)