Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Not able to write SQL query output in to .csv file with shell script. Post 303036108 by sandeepgoli53 on Friday 14th of June 2019 08:19:42 AM
Old 06-14-2019
Thanks Neo and RudiC for your inputs.

RudiC - i will increase the the line size and try.

Neo - Could you please give me some hint about the part i missed, I am new to unix.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

need help in reading a output of a sql query in unix script

i'm used a sql query in a unix script to get the information from table. but unable to extract the output which i need. Any help with logic will be greatly appreciated. my sql query provide output some thing like this - col1 col2 count ---- ---- ------ A B 10 c D 6 e... (8 Replies)
Discussion started by: pharos467
8 Replies

2. Shell Programming and Scripting

TO execute .sql 2005 query file in shell script

Hi, I know in oracle a .sql file is called by @ <path> /<filename>. But how to call in sql 2005, I am opening the sql sessionwith sqsh, is there any command to execute there a .sql file (query in sql 2005) in K shell script. (0 Replies)
Discussion started by: n2ekhil
0 Replies

3. Shell Programming and Scripting

How to use sql data file in unix csv file as input to an sql query from shell

Hi , I used the below script to get the sql data into csv file using unix scripting. I m getting the output into an output file but the output file is not displayed in a separe columns . #!/bin/ksh export FILE_PATH=/maav/home/xyz/abc/ rm $FILE_PATH/sample.csv sqlplus -s... (2 Replies)
Discussion started by: Nareshp
2 Replies

4. Shell Programming and Scripting

SQL Script's output to a CSV file

I need to call and execute an SQL script within a KSH script and get the output/extracted data into a CSV file. Is there any way to get the out put in a CSV file other than spooling ? I tried spooling. Problem is if there is any wrning/comment/Error they all will be spooled into the csv file. I... (4 Replies)
Discussion started by: Sriranga
4 Replies

5. Shell Programming and Scripting

Problem in formatting output of SQL query in excel sheet in shell script

Hi Guys.. Need your help to format the output of my shell script. I am using spool command to take out put in csv file. below is my code. (for example) col USERNAME for a15 col EMAIL for a30 col FULL_NAME for a20 col LAST_LOGIN for a40 col DATE_CREATED for a40 SPOOL 120.csv... (3 Replies)
Discussion started by: Agupte
3 Replies

6. Shell Programming and Scripting

SQL query in UNIX script - output in flat file

Hi, I never did this before... what I want to do is execute a SQL query from a unix script and redirect sql query's output to a flat file (comma separated one) without the header info (no column names). I would also want not to print the query's output to the screen. snapshot of my script:... (13 Replies)
Discussion started by: juzz4fun
13 Replies

7. Shell Programming and Scripting

SQL Query in Shell Script output formatting

Hi All, #!/bin/ksh call_sql () { sql=$1 sqlplus -s $sqlparam_sieb <<EOF SET ECHO OFF; SET NEWPAGE NONE; SET SQLBL OFF; SET VERIFY OFF; SET LINESIZE 2000; SET... (2 Replies)
Discussion started by: Kevin Tivoli
2 Replies

8. Shell Programming and Scripting

Need to write shell script for my .sql file call

Hi Guys, I need to write a simple shell script which will generate a .csv file/report by calling .sql file inside a shell script. Can somebody help me on this. Thanks in advance! Regards, LK (7 Replies)
Discussion started by: lakshmanraok117
7 Replies

9. Shell Programming and Scripting

Run sql query in shell script and output data save as delimited text

I want to run sql query in shell script and output data save as delimited text (delimited text would be comma) Code: SPOOL_FILE=/pgedw/dan.txt SQL=/pgedw/dan.sql sqlplus -s username/password@myhost:port/servicename <<EOF set head on set COLSEP , set linesize 32767 SET TRIMSPOOL ON SET... (8 Replies)
Discussion started by: Jaganjag
8 Replies

10. Shell Programming and Scripting

Shell script appending output of sql query

I am writing the following script to create the file v_out.txt. sqlplus -s /nolog << EOF CONNECT scott/tiger@orcl; whenever sqlerror exit sql.sqlcode; set newpage 0; SET PAGESIZE 0; SET ECHO OFF; SET FEEDBACK OFF; SET HEADING OFF; SET VERIFY OFF; SET LINESIZE 100; set tab off; set... (7 Replies)
Discussion started by: itzkashi
7 Replies
GPIOIIC(4)						   BSD Kernel Interfaces Manual 						GPIOIIC(4)

NAME
gpioiic -- GPIO I2C bit-banging device driver SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device gpio device gpioiic device iic device iicbb device iicbus DESCRIPTION
The gpioiic driver provides an IIC bit-banging interface using two GPIO pins for the SCL and SDA on the gpiobus. gpioiic implements an open collector kind of output, as recommended by the standard, when driving the pins on the gpiobus, i.e, they are never switched to the logical value of '1', or they are '0' or simply open (Hi-Z/tri-state). So the pullup resistors are required so gpioiic can work. On a device.hints(5) based system, like MIPS, these values are configurable for the gpioiic: hint.gpioiic.%d.at The gpiobus you are attaching to. Normally just gpiobus0. hint.gpioiic.%d.pins This is a bitmask of the pins on the gpiobus that are to be used for SCLOCK and SDATA from the GPIO IIC bit-banging bus. To configure pin 0 and 7, use the bitmask of 0b10000001 and convert it to a hexadecimal value of 0x0081. Please note that this mask should only ever have two bits set (any other bits - i.e., pins - will be ignored). hint.gpioiic.%d.scl Indicates which bit in the hint.gpioiic.%d.pins should be used as the SCLOCK source. Optional, defaults to 0. hint.gpioiic.%d.sda Indicates which bit in the hint.gpioiic.%d.pins should be used as the SDATA source. Optional, defaults to 1. On a FDT(4) based system, like ARM, the DTS part for a gpioiic device usually looks like: gpio: gpio { gpio-controller; ... gpioiic0 { compatible = "gpioiic"; /* * Attach to GPIO pins 21 and 22. Set them * initially as inputs. */ gpios = <&gpio 21 1 0 &gpio 22 1 0>; scl = <0>; /* GPIO pin 21 - optional */ sda = <1>; /* GPIO pin 22 - optional */ /* This is an example of a gpioiic child. */ gpioiic-child0 { compatible = "lm75"; i2c-address = <0x4f>; }; }; }; Where: compatible Should always be set to "gpioiic". gpios The gpios property indicates which GPIO pins should be used for SCLOCK and SDATA on the GPIO IIC bit-banging bus. For more details about the gpios property, please consult /usr/src/sys/boot/fdt/dts/bindings-gpio.txt. scl The scl option indicates which bit in the gpios should be used as the SCLOCK source. Optional, defaults to 0. sda The sda option indicates which bit in the gpios should be used as the SDATA source. Optional, defaults to 1. SEE ALSO
fdt(4), gpio(4), gpioled(4), iic(4), iicbb(4), iicbus(4) HISTORY
The gpioiic manual page first appeared in FreeBSD 10.1. AUTHORS
This manual page was written by Luiz Otavio O Souza. BSD
May 14, 2014 BSD
All times are GMT -4. The time now is 11:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy