say one of the .csv file contains two columns DOB and TAX at 5 th and 10 th position. The script has these two column names hard coded.
Now the .csv file has data as shown below:
DOB format : 9999-12-12 (All dob columns will have this value)
Tax id : xxxx-xx-xx (All tax related id columns will have this format value)
Before masking
Now after masking
Please let me know if more information is required
Moderator's Comments:
Please use CODE tags as required by forum rules!
This just doesn't make sense. Why should masking a field change an eight digit field to a ten character field containing eight digits and two hyphens??? Why should masking a field change a six digit field to a nine character field containing seven <x>s and two hyphens???
Your text says that a column with the text DOB (apparently in the 1st line of the field) identifies a field number and every that field should be changed on every line in the file to 9999-12-12. So, you are asking us to change the heading in that field from DOB to 9999-12-12??? Do you really want 9999-12-12, or should it be 9999-12-31???
Please show us some representative sample input data (with sanitized, but not masked, data) in CODE tags AND show the the corresponding output that should be produced by your script in CODE tags.
Note that you refer to DOB, dob, Date of Birth, Dateof Birth, and DATE-OF-BIRTH in the above quoted text; I assume that you realize that all five of these column headings are different and none of them will compare equal to any of the others!
Are we supposed to assume that all of the files you will be processing will have the same fields in the same order? Or is each file different?
You say that you have <comma> and <vertical-bar> separated files. Does a single file ever contain both delimiters? If you have a <comma> delimited file, will the data in that file ever contain a <vertical-bar> character as data (not as a field delimiter)?
What I want to do is just delete some lines from a text file, I know it's easy using copy and redirect function, but what I have to do is edit this file (delete the lines) directly, as new lines may be added to the text file during this period. Can AIX do this ?
# cat text
1:line1
2:line2... (3 Replies)
Since i'm new to scripting i'm findind it difficult to code a script. The script has to be an executable with 2 paramters passed to it.The Parameters are
1. The Control file name(.ctl file)
2. The Data file name(.csv file)
Does anybody have an idea about it? :confused: (3 Replies)
Request if some one could provide me shell script that converts the below "input file" to "CSV format file" given
Name Domain Contact Phone Email Location
----------------------- ------------------------------------------------ ------- ----- ---------------------------------... (7 Replies)
Hi guys. Good day, morning, afternoon or night, depending on where you live.
I have a script shell in which I am looping on files (absolute path) see code section above.
I always have an error: bad substitution.
:wall:
Is it because my variable file is the index of the loop and not a normal... (4 Replies)
Hi Friends,
Could you guys help me out of this problem... I need to send an email to all the users and the email has to be picked from the text file.
text file contains the no. of records like:
giridhar
224285
847333
giridhar276@gmail.com
ramana
84849
33884
venkata.ramana@gmail.com... (6 Replies)
I need to write a C-Shell script with these properties: It should accept two arguments on the command line. The first argument is the name of a file which contains a list of names, and the second argument is the name of a directory. For each file in the directory, the script should print the... (1 Reply)
Hi experts,
I want to convert a txt file having rows and columns (CNAI_DUMP_raw.txt) by comparing it with another text file (paramaters.txt) and generate a output in CSV which contains only 3rd column from CNAI_DUMP_raw.txt, and the columns mentioned in parameters.txt.
FYI: There are two... (16 Replies)
Not sure if this is the correct forum for this question. I have two files. file1.zip, file2
Input:
file1.zip
col1, col2 , col3
a , b , 0:0:0:0:0:c436:9346:d40b
x, y, 0:0:0:0:0:880:39f9:c9a7
m, n , 0:0:0:0:0:80c7:9161:fe00
file2.txt
col1
c4:36:93:46:d4:0b... (1 Reply)