Sponsored Content
Top Forums Shell Programming and Scripting Line break in sqlplus output through ksh script Post 302995721 by os2mac on Tuesday 11th of April 2017 10:23:20 AM
Old 04-11-2017
Quote:
Originally Posted by Sumit Arora
we are generating output in .txt format and viewing output in notepad.
I suspected as much. You have an OS problem not a code problem. Windows and Unix use different end of line characters. You'll need to convert the file in Unix to a windows format before moving it to windows for viewing.

in your Unix box from a shell window do
Code:
man unix2dos

This will change the end of line characters to windows versions and allow you to see the line breaks.
This User Gave Thanks to os2mac For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh script: 'exit' being treated as 'break 2'

hi, in a korn shell script, has anyone ever seen an 'exit' being treated as a 'break 2'? I have a script which has 3 nested loops. Within the inner most loop, i'm trying to exit the script on a fault condition. instead of exiting, it's acting as a 'break 2' and then continuing on with the... (4 Replies)
Discussion started by: gsatch
4 Replies

2. Shell Programming and Scripting

Need help with ksh script that uses sqlplus, called from PHP

I have a ksh script that connects to sqlplus and dumps the query results into a file. The script works file when I run it from the command line, however, when I call it from PHP using system(), exec(), or shell_exec() commands, the script doesn't seem to run the query. It will create the text file... (7 Replies)
Discussion started by: j2owilson
7 Replies

3. Shell Programming and Scripting

How to pass variable to SQLPLUS in a ksh script?

Hi, I am writing a ksh script which will use sqlplus to run a sql and pass 2 variables as the SQL request. In the ksh script, I have 2 variables which are $min_snap and $max_snap holding 2 different numbers. Inside the same script, I am using SQLPLUS to run an Oracle SQL script,... (6 Replies)
Discussion started by: rwunwla
6 Replies

4. UNIX for Advanced & Expert Users

sqlPlus output with new line character

Hi, I have a script which calls a sqlplus command and i'm saving the output in a variable. Z=`sqlplus -s $TC_ORACLE_USER/$TC_ORACLE_PASSWORD@$TC_CONNECT_STRING <<eof set echo off set head off set serveroutput on; set feedback off; select description from period where trunc(sysdate)... (2 Replies)
Discussion started by: decci_7
2 Replies

5. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

6. Solaris

sqlplus output from ksh.

Hi All, I have the below simple script. It runs just fine by itself when I manually invoke it. But once I put it in the crontab with entry: * * * * * /users/myuser/test.ksh >> /users/myuser/log/test.txt" It does NOT print the returned value ($REMAIN) from the DB!? The result in the... (3 Replies)
Discussion started by: steve701
3 Replies

7. Shell Programming and Scripting

Shell Script (ksh) - SQLPlus query filter using a string variable

Using ksh, I am using SQLPlus to execute a query with a filter using a string variable. REPO_DB=DEV1 FOLDER_NM='U_nmalencia' FOLDER_CHECK=$(sqlplus -s /nolog <<EOF CONNECT user/pswd_select@${REPO_DB} set echo off heading off feedback off select subj_name from subject where... (5 Replies)
Discussion started by: nkm0brm
5 Replies

8. Shell Programming and Scripting

Output result with break line

Hello, I am coding a script to check mysql databases using bash script, I would like to check if the status of a table is not 'OK', will return the table name and do some more actions: check.log table1 OK table2 Some error here table3 ... (5 Replies)
Discussion started by: Abu Rayane
5 Replies

9. UNIX for Beginners Questions & Answers

awk script for pattern match and line break

Hi, I have input which reads like 9089.00 ----- kl jkjjljk lkkk; (909099) 9097.00 ----- HGJJHHJ jcxkjlkjvhvlk jhdkjksdfkhfskd 898.00 ----- HHHH I am trying to do something like this - As soon as I found pattern match "XYZ.00-----" it will insert a line break to the input and will go to... (3 Replies)
Discussion started by: Indra2011
3 Replies

10. Shell Programming and Scripting

Oracle/SQLPlus help - ksh Script calling .sql file not 'pausing' at ACCEPT, can't figure out why

Hi, I am trying to write a script that calls an Oracle SQL file who in turns call another SQL file. This same SQL file has to be run against the same database but using different username and password at each loop. The first SQL file is basically a connection test and it is supposed to sort... (2 Replies)
Discussion started by: newbie_01
2 Replies
FvwmRearrange(1)						   Fvwm Modules 						  FvwmRearrange(1)

NAME
FvwmRearrange - rearrange fvwm windows SYNOPSIS
FvwmRearrange is spawned by fvwm, so no command line invocation will work. DESCRIPTION
This module can be called to tile or cascade windows. When tiling the module attempts to tile windows on the current screen subject to certain constraints. Horizontal or vertical tiling is performed so that each window does not overlap another, and by default each window is resized to its nearest resize increment (note some- times some space might appear between tiled windows -- this is why). When cascading the module attempts to cascade windows on the current screen subject to certain constraints. Layering is performed so con- secutive windows will have their window titles visible underneath the previous. INVOCATION
FvwmRearrange is best invoked from a menu, pop up or button. There are a number of command line options which can be used to constrain the layering, these are described below. As an example case, one could call FvwmRearrange with the following arguments: FvwmRearrange -tile -h 10 10 90 90 or FvwmRearrange -cascade -resize 10 2 80 70 The first invocation will horizontally tile windows with a bounding box which starts at 10 by 10 percent into and down the screen and ends at 90 by 90 percent into and down the screen. The second invocation will cascade windows starting 10 by 2 percent into and down the screen. Windows will be constrained to 80 by 70 per- cent of the screen dimensions. Since the resize is also specified, windows will be resized to the given constrained width and height. FvwmRearrange can be called as FvwmTile or FvwmCascade. This is equivalent to providing the -tile or -cascade option. This form is obsolete and supplied for backwards compatibility only. Command-line arguments passed to FvwmRearrange are described here. -a Causes all window types to be affected, even ones with the WindowListSkip style. -animate Attempt to do an animated move, this is ignored if -resize or -maximize are used. -cascade Cascade windows. This argument must be the first on the command line. This is the default. -desk Causes all windows on the desk to be cascaded/tiled instead of the current screen only. -flatx Inhibits border width increment. Only used when cascading. -flaty Inhibits border height increment. Only used when cascading. -h Tiles horizontally (default is to tile vertically). Used for tiling only. -incx arg Specifies a horizontal increment which is successively added to cascaded windows. arg is a percentage of screen width, or pixel value if a p is suffixed. Default is zero. Used only for cascading. -incy arg Specifies a vertical increment which is successively added to cascaded windows. arg is a percentage of screen height, or pixel value if a p is suffixed. Default is zero. Used only for cascading. -m Causes maximized windows to also be affected (implied by -a). -maximize When moving/resizing a window, put it also into maximized state. -mn arg Tiles up to arg windows in tile direction. If more windows exist, a new direction row or column is created (in effect, a matrix is created). Used only when tiling windows. -noanimate Do not attempt to do an animated move. -nomaximize Do not put windows into maximized state. -noraise Inhibits window raising, leaving the depth ordering intact. -noresize Inhibits window resizing, leaving window sizes intact. This is the default when cascading windows. -nostretch If tiling: inhibits window growth to fit tile. Windows are shrunk to fit the tile but not expanded. If cascading: inhibits window expansion when using the -resize option. Windows will only shrink to fit the maximal width and height (if given). -r Reverses the window sequence. -resize Forces all windows to resize to the constrained width and height (if given). This is the default when tiling windows. -s Causes sticky windows to also be affected (implied by -a). -sp Causes windows sticky across pages to also be affected (implied by -a). -sd Causes windows sticky across desks to also be affected (implied by -a). -t Causes transient windows to also be affected (implied by -a). -tile Tile windows. This argument must be the first on the command line. -u Causes untitled windows to also be affected (implied by -a). Up to four numbers can be placed on the command line that are not switches. The first pair specify an x and y offset to start the first window (default is 0, 0). The meaning of the second pair depends on operation mode: When tiling windows it specifies an absolute coordinate reference denoting the lower right bounding box for tiling. When cascading it specifies a maximal width and height for the layered windows. If an affected window exceeds either this width or height, it is resized to the maximal width or height. If any number is suffixed with the letter p, then it is taken to be a pixel value, otherwise it is interpreted as a screen percent- age. Specifying zero for any parameter is equivalent to not specifying it. BUGS
It is probably not a good idea to delete windows while windows are being rearranged. AUTHORS
Andrew Veliath (original FvwmTile and FvwmCascade modules) Dominik Vogt (merged FvwmTile and FvwmCascade to FvwmRearrange) 3rd Berkeley Distribution 09 May 2010 (2.5.30) FvwmRearrange(1)
All times are GMT -4. The time now is 10:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy