Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Help on Oracle insert from shell script Post 303010667 by rbatte1 on Friday 5th of January 2018 04:37:03 AM
Old 01-05-2018
This may be because you are using single quotes in the here document. Try double quotes.


What do you see it doing if you add a set -x on the second line? The trace should show the commands being executed and some of the values being used.



Robin

Last edited by rbatte1; 01-05-2018 at 07:30 AM.. Reason: Added line about trace.
This User Gave Thanks to rbatte1 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script: want to insert values in database when update script runs

Hi , I am new to linux and also also to shell scripting. I have one shell script which unpacks .tgz file and install software on machine. When this script runs I want to insert id,filename,description(which will be in readme file),log(which will be in log file) and name of unpacked folder... (1 Reply)
Discussion started by: ring
1 Replies

2. UNIX for Advanced & Expert Users

unix script for update or insert records from a file to a oracle table

Hi, I have delimited file(|). Sample data: 1|name|50009|DS24|0|12 2|name|30009|DS24|0|13 3|name|20409|DS24|0|14 4|name|20009|DS24|0|15 5|name|10009|DS24|0|16 I want to load this data into a oracle table (update and insert) Please help me the commands and also... (1 Reply)
Discussion started by: unihp1
1 Replies

3. Shell Programming and Scripting

Insert C code in shell script

Hi, Anybody know on how to insert C code in shell script. I am writing BLOB data to a database table in C but I don't know on how to insert the C code in shell script. Thanks in advance. (1 Reply)
Discussion started by: badbunny9316
1 Replies

4. Shell Programming and Scripting

shell script - insert oracle

Hi Frnds, in shell script I have one problem while inserting into oracle table . my script #! /usr/bin/sh while read record do echo $record X=`sqlplus -s STN/errrmddb20@MAHFDR <<eof insert into STN.STN_ERROR_TABLE values($record); eof`... (12 Replies)
Discussion started by: Gopal_Engg
12 Replies

5. Shell Programming and Scripting

Korn shell program to parse CSV text file and insert values into Oracle database

Enclosed is comma separated text file. I need to write a korn shell program that will parse the text file and insert the values into Oracle database. I need to write the korn shell program on Red Hat Enterprise Linux server. Oracle database is 10g. (15 Replies)
Discussion started by: shellguy
15 Replies

6. Solaris

Execution problem in shell script while insert into DB

Hi, am facing some problem while inserting a record into a script Please find script below. `sqlplus -s asdf/asdf123 <<eof! set feedback off; set heading off; set verify off; insert into... (2 Replies)
Discussion started by: senkerth
2 Replies

7. Shell Programming and Scripting

Insert script result into Oracle Table

Hi All, I want to insert STAT and ENDTIME values for each job in joblist into TBL_DAILY_STATUS table. Eg: insert into tbl_daily_status values(STAT,ENDTIME); Please help me on this. #!/bin/ksh joblist="com_abc_job com_abc_dot_job com_abc_seq com_abc_det" for i in $joblist do... (8 Replies)
Discussion started by: vichuelaa
8 Replies

8. Shell Programming and Scripting

Shell Script to insert text after Tag

Hello, I'm doing an Shell Script to insert a text on XML file, i tried sed, awk, perl... i'm doing something wrong, please help me :) well, the script is a bit large, i get some infos on script before 'run' this part to insert the text on XML... domobile() { let i++ echo ... (1 Reply)
Discussion started by: tassomanoel
1 Replies

9. UNIX for Dummies Questions & Answers

Insert text into a file using shell script

Hi, I need to insert "Hello World" text into a file called hai.txt using shell scripting. Kindly help me. For eg: If I open the file hai.txt by giving linux command cat hai.txt, the content of the file should have the text Hello World in it. Thanks (5 Replies)
Discussion started by: karthick nath
5 Replies

10. Shell Programming and Scripting

Script to ingest a csv, validate data and insert into Oracle

Hi all i would appreciate your help... I am looking for a set of unix commands which i can use to 1) ingest a csv file with a known format 2) validate the filename 3) validate the data/datatypes 4) Insert into an oracle db Can you help get me started? yogz888 (1 Reply)
Discussion started by: yogz888
1 Replies
msh(1mh)																  msh(1mh)

Name
       msh - MH shell

Syntax
       msh [ -help ] [ -prompt string ] [ file ]

Description
       The command is an interactive program that implements a subset of the normal MH commands operating on a single file in format.  That is, is
       used to read a file that contains a number of messages, as opposed to the standard MH style of reading a number of files, each file being a
       separate message in a folder.

       The chief advantage of is that, unlike the normal MH style, it allows a file to have more than one message in it.  In addition, can be used
       on other files, such as message archives which have been packed using

       When invoked, reads the named file, and enters a command loop.  You can type most of the normal MH commands.  The syntax and  semantics	of
       these  commands	typed to are identical to their MH counterparts.  In cases where the nature of would be inconsistent with the way MH works
       (for example, specifying a +folder with some commands), will duly inform you.  The commands that currently supports are:
       ali	burst	 comp	 dist	  folder
       forw	inc	 mark	 mhmail   msgchk
       next	packf	 pick	 prev	  refile
       repl	rmm	 scan	 send	  show
       sortm	whatnow  whom

       In addition, has a command which gives a brief overview of all the options.  To terminate either type <CTRL/D>, or use the command.  If the
       file is writable and has been modified, then using will ask you if the file should be updated.

       A redirection facility is supported by Commands may be followed by one of the following standard ULTRIX symbols:

       |	 Open an interprocess channel; connect output to another ULTRIX command.

       >	 Write output to file.

       >>	 Append output to file.

       If file starts with a tilde (~), then a C-shell-like expansion takes place.  Note that commands are interpreted by

       When  parsing  commands	to the left of any redirection symbol, will honor the backslash () as the quote next-character symbol, and double
       quotes (") as quote-word delimiters.  All other input tokens are separated by white space (spaces and tabs).

       You may wish to use an alternative profile for the commands that executes; see for details of the $MH environment variable.

Options
       -help	 Prints a list of the valid options for this command.

       -prompt string
		 Sets the prompt for If the string you specify includes white space, you must enclose it in double quotes  (").   If  you  do  not
		 specify this option, the default prompt is (msh).

       The following defaults are used by

	      file defaults to
	      -prompt (msh)

Restrictions
       The  shell  is  not the C-shell, and a lot of the facilities provided by the latter are not present in the former.  In particular, does not
       support back-quoting, history substitutions, variable substitutions, or alias substitutions.

       does not understand back-quoting.  The only effective way to use inside is to always use the -seq select option.  If you add the  following
       line to your will work equally well from both the shell and
       pick: -seq select -list

       There is a strict limit of messages per file in format which can handle.  Usually, this limit is 1000 messages.

Profile Components
       Path:	      To determine your Mail directory
       Msg-Protect:   To set protections when creating a new file
       fileproc:      Program to file messages
       showproc:      Program to show messages

Files
       The user profile.

       The system customization file.

See Also
       csh(1), packf(1mh), sh(1), mh_profile(5mh)

																	  msh(1mh)
All times are GMT -4. The time now is 09:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy