Sponsored Content
Top Forums Shell Programming and Scripting Unix script for removing the footer from the datafile while loading into externaltable using sqlload Post 302654779 by srikanth_sagi on Tuesday 12th of June 2012 09:08:09 AM
Old 06-12-2012
Hi,
i understood the script you have sent but i have a config file which is sent to us
which have the details
1.fileheader=2
2.filefooter=2
3.location:/scripts/filename.txt ---this file where we are have the records including the header and records and footer

TOTAL_COUNT=`wc -l $FILE_NAME` -- what i need to mention here which filename

TOTAL_COUNT=`expr $TOTAL_COUNT - $fileheader - $filefooter` ---this fileheader and filefooter comes from only config file but we are not reading config file here
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Combine a datafile with Master datafile, emergent!

Hi guys, my supervisor has asked me to solve the problem in 7 days, I've taken 3 days to think about it but couldn't figure out any idea. Please give me some thoughts with the following problem, I have index.database that has only index date: 1994 1995 1996 1997 1998 1999 I have... (6 Replies)
Discussion started by: onthetopo
6 Replies

2. UNIX for Dummies Questions & Answers

sqlload not found error

When i try to run a job in unix, i am getting sqlload error as, sqlload : file not found. Can any one please let me know whats the reason for this.. The PATH & ORACLE_HOME paths names are correct... thanks:confused: hr is the script: here is the script : plz hv a look TABLE_NAME=... (2 Replies)
Discussion started by: abhi_123
2 Replies

3. Shell Programming and Scripting

A footer for shell script

Hi My question might sound crazy, but nevertheless, I have made mu mind to ask. Please ignore if I sound absurd. I have a shell script. When run, this script, prints out a menu to the user and takes the input from the user. It works fine. I just wondered, is it possible to have a 'footer'... (2 Replies)
Discussion started by: guruparan18
2 Replies

4. Shell Programming and Scripting

unix script for loading a data from a file into database

Hi All, I am trying to load a data from a files in a particular directory to a database.. cd $SCC isql metdb >> ${LOGDATA}/LOAD.LOG < ! load from "${LDATA}/${FORM}.ld" insert into $LOADTABLE ! But it's showing the error "syntax error at line 46 : `<<' unmatched" Can u plz help me... (5 Replies)
Discussion started by: grajesh_955
5 Replies

5. Shell Programming and Scripting

sorting the datafile in an order given in second datafile

Hi, I have two files: first input file is having 7-8 columns, and second data file is like I want to arrange my datafile1 in the order given in second data file, by comparing the seconddatafile with the second column of first file and print the entire line....also if any... (2 Replies)
Discussion started by: CAch
2 Replies

6. Shell Programming and Scripting

Removing header and footer

I have two files which are getting sent to a UNIX server in order to be bcp'd into a database. The bcp is failing because there's a header and footer row on the file which give the date of the file and the number of rows in it. That's because the file is also being used for another process, so we... (1 Reply)
Discussion started by: Tom Sawyer
1 Replies

7. Shell Programming and Scripting

Add header and footer with record count in footer

This is my file(Target.txt) name|age|locaction abc|23|del xyz|24|mum jkl|25|kol The file should be like this 1|03252012 1|name|age|location 2|abc|23|del 2|xyz|24|mum 2|jkl|25|kol 2|kkk|26|hyd 3|4 Column 1 is row indicator for row 1 and 2, column indicator is 1,for data rows... (1 Reply)
Discussion started by: itsranjan
1 Replies

8. Shell Programming and Scripting

Removing header or footer from file

Hi Every one, what is the coomand to remove header or footer from a file. Please help me by providing command/syntax to remove header/footer from unix. Thanks in advance for all your support. (5 Replies)
Discussion started by: sridhardwh
5 Replies

9. Shell Programming and Scripting

How to avoid locks while loading database through UNIX script.?

Hi, I have the following requirement: I have load_cdr as main scriptwhich loads all the file records into vertica database through unix script. But there are two files which try to update same table..n thats y my script is getting failed... Can any1 give me some logic how to over come this... (6 Replies)
Discussion started by: gnnsprapa
6 Replies

10. UNIX for Advanced & Expert Users

Script to automate add/resize datafile in Oracle ASM Storage

Hi all, Could anyone please share ideas or logic on how to automate add/resize datafile in Oracle ASM Storage for Oracle RAC/Single Node databases when any tablespace space alert is trigerred by OEM? Thanks for your help and time on it! Thanks&regards, a1_win Please DON'T use CODE tags... (0 Replies)
Discussion started by: a1_win
0 Replies
IPSEC_ADDCONN(8)						  [FIXME: manual]						  IPSEC_ADDCONN(8)

NAME
ipsec_addconn - load a given policy into the pluto IKE daemon SYNOPSIS
ipsec addconn --configsetup [--rootdir dir] [--config filename] [--ctlbase socketfile] ipsec addconn --addall [--rootdir dir] [--config filename] [--ctlbase socketfile] [--defaultroute addr] [--defaultroutenexthop addr] ipsec addconn [--rootdir dir] [--config filename] [--ctlbase socketfile] [--defaultroute addr] [--defaultroutenexthop addr] name1 [name2 ..] ipsec addconn [--listroute] [--liststart] [--rootdir dir] [--config filename] [--ctlbase socketfile] ipsec addconn --help DESCRIPTION
ipsec addconn takes a config file (or stdin) containing the format of ipsec.conf, or the format of individual "conn" sections, and uses that information to load named or all connections defined in that configuration file into the running openswan pluto IKE daemon. If no configuration file is specified, the default configuration file is used. If no pluto socket is specified, the default socket location will be used. When --addall is used, all connections defined in the config file will be operated on. Otherwise, only the specified connection names will be affected. When addcon is run, connections that have the auto= option set to add, start or route will be loaded, routed or initiated. If a connection was loaded or initiated already, it will be replaced. When --configsetup is specified, the configuration file is parsed for the config setup section and printed to the terminal usable as a shell script. When --listroute or --liststart is specified, no connections are added or replaced, only shown. This command can be used to verify which connections the addcon command would act upon, without actually performing any action. HISTORY
Man page written for the Xelerance Openswan project <http://www.openswan.org/> by Paul Wouters [FIXME: source] 10/06/2010 IPSEC_ADDCONN(8)
All times are GMT -4. The time now is 11:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy