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
Hello,
I have a file contains two columns. I need to print the lines after “xxx” so i'm trying to match "xxx" & cut the lines after that. I'm trying with the grep & cut command, if there any simple way to extract this please help me.
Sample file :
name id
AAA 123
AAB 124
AAC 125... (4 Replies)
Discussion started by: Shenbaga.d
4 Replies
3. Shell Programming and Scripting
ALL,
Please help with this ...
File1
000433,ds00d11,tdev,ds00d11_view,0CD3
000433,ds00d12_34,tdev,ds00d12_view,132D
File2
CG01_ds00d11_drs,rs1_ds00d11_0CD3_114D,000433,0CD3
CG01_ds00d11_drs,rs1_ds00d11_0CD3_114D,000566,114D
... (6 Replies)
Discussion started by: greycells
6 Replies
4. Shell Programming and Scripting
Not Sure how to do this. Some combo of awk and sed perhaps. If String in File1 match String in file2 then append file2
File1.txt
BullTerrier
Boxer
Bulldog
File2.txt
<Defined info="AllAnimals" group="Adoptions" setting="animals">
<SomeID ="NumbersRepresentingDogName">
<for>
<add... (2 Replies)
Discussion started by: TY718
2 Replies
5. Shell Programming and Scripting
file
11 2
12 6
13 7
114 6
011 7
if I'm searching for 11, output needed is
output:
11 2
011 7
Code: awk '$1 ~ /^11$/' file
I used the above to match exact, but it avoiding "011 7" line too, how to resolve this? (6 Replies)
Discussion started by: Roozo
6 Replies
6. 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
7. Shell Programming and Scripting
I need to take 2 input files and create 1 output based on matches from each file. I am looking to match field #1 in both files (Userid) and create an output file that will be a combination of fields from
both file1 and file2 if there are any differences in the fields 2,3,4,5,or 6.
Below is an... (5 Replies)
Discussion started by: ambroze
5 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I need help on appending certain field in my file1.txt based on matched patterns in file2.txt using awk or sed.
The blue color need to match with one of the data in field $2 in file2.txt. If match, BEGIN and FINISHED value in red will have a new value from field $3 and $4 accordingly.
... (1 Reply)
Discussion started by: redse171
1 Replies
9. Shell Programming and Scripting
Using a bash script, I need to find all files in a folder "except" the newest file. Then I need to insert the contents of one text file into all the files found. This text needs to be placed at the beginning of each file and needs a blank line between it and the current contents of the file. Then I... (5 Replies)
Discussion started by: Trapper
5 Replies
10. Shell Programming and Scripting
Hi,
I have some question and need some guidance how to sort and match multiple files.
1. all the data in the files are numbers
e.g. 1234567
1584752
2563156
2. each sorted file have their own ouput. e.g. test.csv -> test_sorted.csv
3. Then, I need to match all... (4 Replies)
Discussion started by: nazri76
4 Replies