Populating File data with custom manipulation on file names
Hi,
I am confused how to proceed firther please find the problem below:
Input Files:
Output File Name: MMA_RFC_GEOG_NAM_DIM_LOD.txt
Sample Record(DCIA_GEOG_DATA_OCEAN.TXT)Layout same for all input files
HTML Code:
"Terr","TerrName","Dist","DistName","REGION","RgnName","BCName"
"A0019473","Abington PA 1","A0013142","Langhorne PA","A0013261","Philadelphia PA","PROGRESSIVE"
"A0019476","Albany GA 1","A0013068","Albany GA","A0013251","Jacksonville FL","TRADITIONAL"
Requirement:
Concatenate 4 files by removing the headers from all four files.Convert comma to pipeline and remove qoutes.
I got the Solution:
Now I need to do the folowing:
Add a blank field before the last field and add a field after the last field and populate the last field with the last part of the 4 file names for their respective records - between the last "_" and the ".txt".
eg: Records for DCIA_GEOG_DATA_OCEAN.TXT file will have data like below in output:
HTML Code:
A0010000|Abilene TX A 1|A0010957|Dallas TX|A0010998|West||US HEADQUARTERS|OCEAN
A0010001|Akron OH A 1|A0010954|Cleveland OH|A0010997|Central||US HEADQUARTERS|OCEAN
Records for DCIA_GEOG_DATA_MCRO.TXT file will have data like below in output:
Records for DCIA_GEOG_DATA_CVAS.TXT file will have data like below in output:
HTML Code:
A0010000|Abilene TX A 1|A0010957|Dallas TX|A0010998|West||US HEADQUARTERS|CVAS
A0010001|Akron OH A 1|A0010954|Cleveland OH|A0010997|Central||US HEADQUARTERS|CVAS
Records for DCIA_GEOG_DATA_MCR.TXT file will have data like below in output:
Any Help Appreciated !!!
I have a string of pre defined ip address list which will always remain constant their order will never change like in below sample:
iplist=8.8.5.19,9.7.5.14,12.9.9.23,8.8.8.14,144.1.113
In the above example i m considering only 5 ips but there could be many more.
Now i have a file which... (15 Replies)
Data files coming in different names in a file name called process.txt.
1. shipments_yyyymmdd.gz
2 Order_yyyymmdd.gz
3. Invoice_yyyymmdd.gz
4. globalorder_yyyymmdd.gz
The process needs to discard all the below files and only process two of the 4 file names available
... (1 Reply)
Hallo Friends,
I need you help. My file has 5000 or so lines and currently looks like below(sample).
Service Type,Origin,Destination,Rate Per Minute,Minimum Charge,Time Based Rate,Time Based From Day,Time Based To Day,Time Based From Time,Time Based To Time,Destination Prefix List,,
VoIS... (3 Replies)
Hello,
I want to split a file based on an input list file that contains the lines each split should have + a corresponding file name.
#!/bin/sh
# sed -n 'start_line_#,end_line_#p' my_input_file > lines_extracted_output_file
while read a b c
do
sed -n '$a,$bp' myLarge.file > $c.split... (2 Replies)
Hi,
I have a data file xyz.dat similar to the one given below,
2345|98|809||x|969|0
2345|98|809||y|0|537
2345|97|809||x|544|0
2345|97|809||y|0|651
9685|98|809||x|321|0
9685|98|809||y|0|357
9685|98|709||x|687|0
9685|98|709||y|0|234
2315|98|809||x|564|0
2315|98|809||y|0|537... (2 Replies)
Hi,
I have two, double column data files (file1 and file2). I want to add the second column of file2 to as 3rd column of file1. But, the 3rd column values corresponds to the values of the 2nd column.
example:
file1:
X Y
=========
x1 y2
x3 y4
x2 y4
x5 y3
=========
file2:
Y ... (7 Replies)
i have a file in follwing format
0110
1020
1011
1032
1020
2005
2003
1050
i want the output in such a way that all non zero numbers will be converted into 1
like this
0110
1010
1011
1011
1010
1001
1001
1010 (3 Replies)
Hi,
I have a table (e.g.):
a 1 e 4 5 6
b 2 r 4 4 2
c 5 r 3 7 1
d 9 t 4 4 9
.
.
What I need to do is to set the values of some values in column 2 to negative values. For example, the values 2 and 9 should become -2 and -9 in the modified file. How should I go about... (2 Replies)