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
echo(1B)					     SunOS/BSD Compatibility Package Commands						  echo(1B)

NAME
echo - echo arguments to standard output SYNOPSIS
/usr/ucb/echo [-n] [argument] DESCRIPTION
echo writes its arguments, separated by BLANKs and terminated by a NEWLINE, to the standard output. echo is useful for producing diagnostics in command files and for sending known data into a pipe, and for displaying the contents of envi- ronment variables. For example, you can use echo to determine how many subdirectories below the root directory (/) is your current directory, as follows: o echo your current-working-directory's full pathname o pipe the output through tr to translate the path's embedded slash-characters into space-characters o pipe that output through wc -w for a count of the names in your path. example% /usr/bin/echo "echo $PWD | tr '/' ' ' | wc -w" See tr(1) and wc(1) for their functionality. The shells csh(1), ksh(1), and sh(1), each have an echo built-in command, which, by default, will have precedence, and will be invoked if the user calls echo without a full pathname. /usr/ucb/echo and csh's echo() have an -n option, but do not understand back-slashed escape characters. sh's echo(), ksh's echo(), and /usr/bin/echo, on the other hand, understand the black-slashed escape characters, and ksh's echo() also understands a as the audible bell character; however, these commands do not have an -n option. OPTIONS
-n Do not add the NEWLINE to the output. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), echo(1), ksh(1), sh(1), tr(1), wc(1), attributes(5) NOTES
The -n option is a transition aid for BSD applications, and may not be supported in future releases. SunOS 5.10 3 Aug 1994 echo(1B)