Sponsored Content
Full Discussion: SQL and shell scripts
Top Forums UNIX for Dummies Questions & Answers SQL and shell scripts Post 302086450 by Amruta Pitkar on Thursday 24th of August 2006 03:51:04 AM
Old 08-24-2006
Hi

The Escape characters before the brackets ...still gives the same problem..The variables are empty...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with GDL to SQL scripts

Hi to everyone, i want ask if someone knows about a script/program to convert the .gdl (Interbase) to .sql scripts. I wrote a little script to make it but it's very very simple, and the triggers and some code from .gdl are so difficult to me. If somebody could help me, I would very thankful. ... (0 Replies)
Discussion started by: ch4r1e5
0 Replies

2. Shell Programming and Scripting

Calling SQL scripts through Shell Script

Oracle and Scripting gurus, I need some help with this script... I am trying to add the query SELECT * FROM ALL_SYNONYMS WHERE SYNONYM_NAME = 'METADATA' in the current script.... Read the result set and look for the TABLE_NAME field. If the field is pointing to one table eg.... (18 Replies)
Discussion started by: madhunk
18 Replies

3. Shell Programming and Scripting

Running SQL Scripts from Shell script - Need insight!

I've a script that fetches various values from the database as below: #! /bin/ksh $conn="user/pwd@service_name" `sqlplus -s << $conn EOF1 @xyz.sql @pqr.sql @abc.sql EOF1` The output of the script should generate txt files containing the results from queries which are further... (6 Replies)
Discussion started by: manthasirisha
6 Replies

4. Shell Programming and Scripting

Calling SQL LDR and SQL plus scripts in a shell script

Hi- I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment... I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
Discussion started by: rajagavini
5 Replies

5. Shell Programming and Scripting

any possible solution on sql calling scripts

hi all, i have a function which will take i/p as a ddl sctipt as i/p and execute it, let function execute_sql { db_var="$1" v_cnt=`sqlplus -s XXXXX/XXXXX@aXXX << ENDSQL | sed -e "s/Connected\.//" -e "/^$/d" set pagesize 0 feedback off verify off heading off echo off serveroutput on size... (4 Replies)
Discussion started by: manas_ranjan
4 Replies

6. Shell Programming and Scripting

Not able to execute many SQL scripts within a shell script

I am using HP-UX: I have written a ksh script where I need to connect to sqlplus and execute few sql scripts. Part of this code is - sqlplus user/temp1234 <<! set serverout on set feedback off set pages 1000 set colsep , set echo off spool /home/supp1/pks/output.csv... (8 Replies)
Discussion started by: Sriranga
8 Replies

7. Shell Programming and Scripting

Execute multiple SQL scripts from single SQL Plus connection

Hi! I would like to do a single connection to sqlplus and execute some querys. Actually I do for every query one connection to database i.e echo 'select STATUS from v$instance; exit' > $SQL_FILE sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT echo 'select VERSION from v$instance;... (6 Replies)
Discussion started by: guif
6 Replies

8. UNIX for Advanced & Expert Users

Call parallel sql scripts from shell and return status when both sql are done

Hi Experts: I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing... (3 Replies)
Discussion started by: huasheng8
3 Replies

9. UNIX and Linux Applications

how to execute multiple .sql scripts from within a shell script using sqlplus

using sqlplus I want to execute a .sql script that has dbms_output statments in rhe script. I want to write the dbms_output statements from .sql file to a log file. is this possible. thanks any help would be appreciated :wall: (1 Reply)
Discussion started by: TRS80
1 Replies

10. Shell Programming and Scripting

Issue in SQL Loader scripts

Hi, I'm planning to load the data from FLAT files into tables. Source file: more input.txt LRNO|Bale|Horsepower|NumberOfBarges|BollardPull|NumberOfCars|GasCapacity|GrainCapacity|IndicatedHorsepower|LiquidCapacity|... (6 Replies)
Discussion started by: shyamu544
6 Replies
URI::Escape(3)						User Contributed Perl Documentation					    URI::Escape(3)

NAME
URI::Escape - Escape and unescape unsafe characters SYNOPSIS
use URI::Escape; $safe = uri_escape("10% is enough "); $verysafe = uri_escape("foo", "-377"); $str = uri_unescape($safe); DESCRIPTION
This module provides functions to escape and unescape URI strings as defined by RFC 2396 (and updated by RFC 2732). URIs consist of a restricted set of characters, denoted as "uric" in RFC 2396. The restricted set of characters consists of digits, letters, and a few graphic symbols chosen from those common to most of the character encodings and input facilities available to Internet users: "A" .. "Z", "a" .. "z", "0" .. "9", ";", "/", "?", ":", "@", "&", "=", "+", "$", ",", "[", "]", # reserved "-", "_", ".", "!", "~", "*", "'", "(", ")" In addition any byte (octet) can be represented in a URI by an escape sequence; a triplet consisting of the character "%" followed by two hexadecimal digits. Bytes can also be represented directly by a character using the US-ASCII character for that octet (iff the character is part of "uric"). Some of the "uric" characters are reserved for use as delimiters or as part of certain URI components. These must be escaped if they are to be treated as ordinary data. Read RFC 2396 for further details. The functions provided (and exported by default) from this module are: uri_escape($string, [$unsafe]) This function replaces all unsafe characters in the $string with their escape sequences and returns the result. The uri_escape() function takes an optional second argument that overrides the set of characters that are to be escaped. The set is specified as a string that can be used in a regular expression character class (between [ ]). E.g.: "x00-x1fx7f-xff" # all control and hi-bit characters "a-z" # all lower case characters "^A-Za-z" # everything not a letter The default set of characters to be escaped is all those which are not part of the "uric" character class shown above as well as the reserved characters. I.e. the default is: "^A-Za-z0-9-_.!~*'()" uri_unescape($string,...) Returns a string with all %XX sequences replaced with the actual byte (octet). This does the same as: $string =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; but does not modify the string in-place as this RE would. Using the uri_unescape() function instead of the RE might make the code look cleaner and is a few characters less to type. In a simple benchmark test I made I got something like 40% slowdown by calling the function (instead of the inline RE above) if a few chars where unescaped and something like 700% slowdown if none where. If you are going to unescape a lot of times it might be a good idea to inline the RE. If the uri_unescape() function is passed multiple strings, then each one is unescaped returned. The module can also export the %escapes hash which contains the mapping from all 256 bytes to the corresponding escape code. Lookup in this hash is faster than evaluating "sprintf("%%%02X", ord($byte))" each time. SEE ALSO
URI COPYRIGHT
Copyright 1995-2001 Gisle Aas. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.0 2002-07-18 URI::Escape(3)
All times are GMT -4. The time now is 05:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy