10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have two csv files of different sizes. The output file needs to have file1 contents on top of file2 contents where file2 col1 is >= to file1 col1, and file2 col1(same value) is < file1 col1 (next value). So basically, some file2 rows will be matched to the same file1 row because it is the closet... (7 Replies)
Discussion started by: aachave1
7 Replies
2. Shell Programming and Scripting
Judi # cat File1
judi /export/home 76
judi /usr 83
judi #
judi # cat File2
judi /export/home 79
judi /usr 82
judi #
if COLUMN3 of File2 is greater that COLUMN3 of File1, then print File2's lines
juid /export/home 79
Code tags please (2 Replies)
Discussion started by: judi
2 Replies
3. UNIX for Dummies Questions & Answers
So I have this issue. I have 4 files. the first one is the master file who has all possible combinations:
file 1
- a
- b
- c
- d
- e
the other three have some of the letters and a number instead of - for example
file 2
34 a
5 c
file 3
10 b
12 ... (3 Replies)
Discussion started by: Quijotes
3 Replies
4. Shell Programming and Scripting
Hi, I am newbie in shell script.
I need your help to solve my problem.
Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file.
File1:
SourceFile,DateTimeOriginal
/home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies
5. Shell Programming and Scripting
Input file :
5 20
500 2
20 41
41 0
23 1
Desired output :
5
2
20
0
1
By comparing column 1 and 2 in each line, I hope can print out the column with smallest number.
I did try the following code, but it don't look good :( (2 Replies)
Discussion started by: perl_beginner
2 Replies
6. Shell Programming and Scripting
Hi,
My input files is like this
axis1 0 1 10
axis2 0 1 5
axis1 1 2 -4
axis2 2 3 -3
axis1 3 4 5
axis2 3 4 -1
axis1 4 5 -6
axis2 4 5 1
Now, these are my following tasks
1. Print a first column for every two rows that has the same value followed by a string.
2. Match on the... (3 Replies)
Discussion started by: jacobs.smith
3 Replies
7. Shell Programming and Scripting
Hi,
I am writing a comparator script, which comapre two txt files(column by column)
below are the precondition of this comparator
1)columns of file are not seperated
Ex.
file1.txt
8888812341181892
1243548895685687
8945896789897789
1111111111111111
file2.txt
9578956789567897... (2 Replies)
Discussion started by: kumar96877
2 Replies
8. Shell Programming and Scripting
Here is my situation. I need to compare two tab separated files (diff is not useful since there could be known difference between files).
I have found similar posts , but not fully matching.I was thinking of writing a shell script using cut and grep and while loop but after going thru posts it... (2 Replies)
Discussion started by: blackjack101
2 Replies
9. Shell Programming and Scripting
Hi. How do I find an expression with awk in only one column, and if it fits, then print that whole column.
1 apple oranges
2 bannanas pears
3 cats dogs
4 hesaid shesaid
echo "which number:"
read NUMBER (user inputs number 2 for this example)
awk " /$NUMBER/ {field to search is field... (2 Replies)
Discussion started by: glev2005
2 Replies
10. Shell Programming and Scripting
Hi, I would like to compare file1 and file2
file1
1
2
3
file2
1 a
2 b
3 c
4 d
The result should only print out "d" in file 2.
Thanks (3 Replies)
Discussion started by: phamp008
3 Replies