09-27-2007
Script for reading filelist and preparing param file.
Hi All,
Not sure if this would be in a dummies sectiin or advanced. I'm looking for a script if someone has doen something like this.
I have list of files -
adc_earnedpoints.20070630.txt
adc_earnedpoints.20070707.txt
adc_earnedpoints.20070714.txt
adc_earnedpoints.20070721.txt
adc_earnedpoints.20070728.txt
adc_earnedpoints.20070804.txt
adc_earnedpoints.20070811.txt
adc_earnedpoints.20070818.txt
I need to process these files using informatica process and write the content of the file to a DB table. While writing the file to db i need to capture the date from the file name and pass to a parameter file in unix and use the parameter file to write the data value in db. And also i need to process 1 file for each run so that i can grab teh date from teh file name and capture in a param file which will be used by Informatica process. Something like this -
file processing adc_earnedpoints.20070630.txt should be renamed to generic file adc_earnedpoints.txt and the date 20070630 should be wrriten to a param file with values -
s_load_earned_points (informatica session)
$$process_date=20070630 (which will be called in teh informatica mapping.
And similarly process teh rest of files.
Has anyone ever done something like this before, if so could you please provide teh script for this.
Any help is greatly & kindly appreciated.
Regards,
Beginer.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
kindly help me in getting nth file from file list
ls load*.txt > filelist.txt
#filelist.txt contains list of files starts with load as filename
now i am required to get one by one from filelist.txt for further processing, kindly let me know how to get it.
thanks in advance
-Bali (1 Reply)
Discussion started by: balireddy_77
1 Replies
2. UNIX for Advanced & Expert Users
Hi All,
Not sure if this would be in a dummies sectiin or advanced. I'm looking for a script if someone has doen something like this.
I have list of files -
adc_earnedpoints.20070630.txt
adc_earnedpoints.20070707.txt
adc_earnedpoints.20070714.txt
adc_earnedpoints.20070721.txt... (1 Reply)
Discussion started by: thebeginer
1 Replies
3. UNIX for Dummies Questions & Answers
For starters, I have read the forums from top to bottom and cannot find a solution to this particular scenario. Just finished up two hours or scouring the archives. Here is my question which has been asked numerous times before but never fully explained for this particular solution: How do I pass a... (2 Replies)
Discussion started by: jwil0m0
2 Replies
4. Shell Programming and Scripting
Hi,
I need to parse text, xml files to get the statistic numbers and prepare summary csv file.
What is the best way to parse these file and prepare csv file.
Any idea you have , please?
Regards, (2 Replies)
Discussion started by: LinuxLearner
2 Replies
5. Shell Programming and Scripting
Hi there,
I have files (tsv) like this:
CTLPort IO Rate(IOPS) Read Hit(%) Write Hit(%) Timestamp
0A 136 97 100 09:36:48
0B 3 100 100 09:36:48
0C 88 35 100 09:36:48
0A 87 100 100 09:37:49
0B 3 97 100 09:37:49
0C 83 45 100 09:37:49
0A 108 83 100 09:38:48
0B 3 100 100 09:38:48... (1 Reply)
Discussion started by: gray380
1 Replies
6. Shell Programming and Scripting
Hi all,
I have a question for the Gurus. I apologize if this has bee shared before but I couldn't find the link.
I am trying to read parameters from an external parameter file. What I m trying to achieve is read selected lines from an external parameter file into the script. for eg my param... (4 Replies)
Discussion started by: maverick1947
4 Replies
7. Shell Programming and Scripting
Hi all,
I am receiving files named like:
ABC_20120730.csv
ABC_20120801.csv
ABC_20120812.csv
They are residing in a folder named Incoming.
I am supposed to write a script that will create a filelist which will contain only the name of the latest file beginning with ABC_, by YYYYMMDD... (3 Replies)
Discussion started by: kedrick
3 Replies
8. Linux
Hi All,
Can anyone give me Shell script sample script to generate Param file by Reading Values from SQL Plus query and it should assign those values to variables like..
$$SChema_Name='ORCL'
Thanks in Advance... Srav... (4 Replies)
Discussion started by: Sravana Kumar
4 Replies
9. Shell Programming and Scripting
Hi everyone,
I need a way to take the value of a parameter with a for lood. For example i execute the script with this parameter
./Script PARAM1 PARAM2 PARAM3 PRAM4
for i in <LIST OF PARAMETERS>
do
PARAMETERS=$<NUMBER OF PARAMETER>
done
How can i express <LIST OF... (1 Reply)
Discussion started by: Xedrox
1 Replies
10. AIX
First two days of shell scripting... I've looked at awk/sed and man sed only to get off into the weeds of complexity that may not be needed here...
hints for awk or sed or other method to magically change the bolded item below?
Nutshell: HFTST=Y #test mode = true to false & back again so... (0 Replies)
Discussion started by: JeffPGMT
0 Replies
MKBOM(8) BSD System Manager's Manual MKBOM(8)
NAME
mkbom -- create a bill-of-materials file
SYNOPSIS
mkbom [-s] directory bom
mkbom [-s] -i filelist bom
mkbom -h | --help
DESCRIPTION
The mkbom command creates a bill-of-materials (bom(5)). You must specify either a source as a directory, or a text file containing a file
listing as outputted by lsbom(8). mkbom will generate bill-of-materials information based on that information. Any existing bomfile will be
overwritten by the new bomfile.
Options:
-h print full usage
-s create a simplified bom containing only file paths
-i filelist use the information in filelist, one entry per line, to construct the bom file. The format of the file should match lsbom(8)
output with no formatting options (the default). If -s is given to mkbom, the input filelist should contain only pathnames, as
with lsbom -s.
SEE ALSO
bom(5), ditto(8), mkbom(8)
HISTORY
The mkbom command appeared in NeXTSTEP as a tool to create bom files used during installation.
Mac OS X September 26, 2006 Mac OS X