10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to parse two csv files and make a match in one column then print the entire file to a new file and append an additional column that gives description from the match to the new file. If a match is not made, I would like to add "NA" to the end of the file
Command that Ive been using... (6 Replies)
Discussion started by: dis0wned
6 Replies
2. Shell Programming and Scripting
I am trying to create a cronjob that will run on startup that will look at a list.txt file to see if there is a later version of a database using database.txt as the source. The matching lines are written to output.
$1 in database.txt will be in list.txt as a partial match. $2 of database.txt... (2 Replies)
Discussion started by: cmccabe
2 Replies
3. Shell Programming and Scripting
Not clear how to do so. Looking to append the 1st match of said pattern with 'OK TO REMOVE'
file containing patter
File1.txt
RMS_QUANTITY_RT
SMS_QUANTITY_RT
file to search
File2.txt
<!-- dec=664, SMS_QUANTITY_RT -->
<!-- dec=664, RMS_QUANTITY_RT -->
Projected Results
<!--... (3 Replies)
Discussion started by: TY718
3 Replies
4. Shell Programming and Scripting
Hi,
I need help to match two files based on two columns.
file_1
ID AA An Ca Ele Pro Su Ot Tra
g13950 No No Yes No Yes Yes Yes Yes
g05760 Yes No No No No Yes Yes Yes
g12640 No No No No No No No No
k17720 No Yes No No No No No Yes
g05640 Yes Yes Yes No No Yes Yes Yes
file_2
... (8 Replies)
Discussion started by: redse171
8 Replies
5. Shell Programming and Scripting
Hi,
I need help with this-
input.txt :
L B white
X Y white
A B brown
M Y black
Read this input file and if 3rd column is "white", then add specific lines to another file insert.txt.
If 3rd column is brown, add different set of lines to insert.txt, and so on.
For example, the given... (6 Replies)
Discussion started by: prashob123
6 Replies
6. Shell Programming and Scripting
Ok, I have a script with a commandline option that allows the user to add a custom function to the script file. I have tried everything in my limited knowledge of sed to get this to work and keep coming up short. I need sed to search for a line starting with a pattern, I've got that part so far,... (0 Replies)
Discussion started by: DC Slick
0 Replies
7. Shell Programming and Scripting
Hi all,
I have output files that are all text files with various different extensions.
So, if I submit the input file "job_name.inp", when it finishes I get an output file "job_name.dat". A typical input file looks something like this:
$CONTRL SCFTYP=RHF RUNTYP=ENERGY MAXIT=199 MULT=1... (4 Replies)
Discussion started by: marcozd
4 Replies
8. Shell Programming and Scripting
I need to write a program to do something like a 'vlookup' in excel. I want to match data from file2 based on two fields (where both match) in file1, and for matching lines, add the data from two of the fields from file2 to file1.
If anyone knows something in perl or awk that can do this, I'd be... (20 Replies)
Discussion started by: jamessmith01
20 Replies
9. UNIX for Advanced & Expert Users
Hi,
I have a file which have set of rows and has to create separate files based on the id.
Eg:
001_AHaris020
001_ATony030
002_AChris090
002_ASmit060
003_AJhon001
Output: I want three files like 001_A.txt, 002_A.txt and 003_A.txt.
001_A.txt should have
... (1 Reply)
Discussion started by: techmoris
1 Replies
10. Shell Programming and Scripting
Hi All,
I have two comma separated value(CSV) files, say FileA and FileB.
The contents looks like that shown below.
FileA
EmpNo,Name,Age,Sex,
1000,ABC,23,M,
1001,DES,24,F, ... (2 Replies)
Discussion started by: ultimate
2 Replies