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
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
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
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
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
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
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
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
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
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
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®ards,
a1_win
Please DON'T use CODE tags... (0 Replies)
Discussion started by: a1_win
0 Replies
LEARN ABOUT DEBIAN
x_init
X_INIT(1gmt) Generic Mapping Tools X_INIT(1gmt)
NAME
x_init - Initialization of Cross-Over Data Bases.
SYNOPSIS
x_init -I
DESCRIPTION
The purpose of x_init is to create two key files that will be holding all the cross-over information for all the cruises tested. These
files are called xx_base.b and xx_legs.b, and they will contain data for each cross-over and totals for each leg, respectively. x_init
will create these two files in the current directory, and write out the fileheader with a 1 as the next record number in the case of
xx_base.b. NB! Any previous files with the same names in the current directory will be erased, so use with caution.
-I Must be present form initialization to take effect.
BEWARE
Both files are binary and have fixed record lengths. The formats of the files are as follows:
xx_base.b:
Record length = 40 bytes.
Rec # 1: fileheader
Rec # 2: pairheader
Next n recs: crossover-structure
Rec # n+3: pairheader etc.
The fileheader is a 40 byte character string where the last 10 bytes contains the record number of the last record in the file. The
pairheader is a 40 byte character string which contains the names of the two legs in question and the number of COEs generated
between them. The crossover-structure contains all the information for one COE, that is lat, lon, time along leg values of gravity,
magnetics, and bathymetry at the cross-over point, the heading of track #1, and the heading of track #2. See program listing for
more details on formats. The file is sequential in that new data are appended at the end of the file.
xx_legs.b:
Record length = 204 bytes.
Each record contains the complete information for each leg that has been checked. The leg-structure contains fields like year of
cruise, number of internal/external COEs for gravity, magnetics, and bathymetry, their means and standard deviations, and the best
fitting regression lines, i.e. the dc-shifts and drift-rates computed from the time/error data points. See program listing for com-
plete description of record format.
SEE ALSO
GMT(1), x_system(1)
REFERENCES
Wessel, P. XOVER: A Cross-over Error Detector for Track Data, Computers & Geosciences, 15, 333-346.
GMT 4.5.7 15 Jul 2011 X_INIT(1gmt)