10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
i want to compare first columns from two different files ,if equal print the file2's second column else print the zero.Please help me...
Please use CODE tags as required by forum rules!
Please post in... (1 Reply)
Discussion started by: bhaskar illa
2. UNIX for Dummies Questions & Answers
I would like to add two additional conditions to the actual code I have: print '+' if in File2 field 5 is greater than 35 and also field 7 is grater than 90.
while read -r line
grep -q "$line" File2.txt && echo "$line +" || echo "$line -"
done < File1.txt '
Input file 1:
... (5 Replies)
Discussion started by: bernardo.bello
3. Shell Programming and Scripting
I have two files, chap.txt and complex.txt.
chap.txt looks like this:
complex.txt looks like this:
a c d e l m n j
a d l p q r
c p r m
......... (7 Replies)
Discussion started by: AshwaniSharma09
4. Shell Programming and Scripting
I have two text files that look something like this:
I want to find the line where the first column matches and then combine the second columns into a single... (8 Replies)
Discussion started by: pbluescript
5. Shell Programming and Scripting
Can somebody pls help me with this...
I have a directory (dir1) which has many subdirectories(vr001,vr002,vr003..) with each subdir containing similar text file(say ras.txt).
I have another directory(dir2) which has again got some subdir(vr001c,vr002c,vr003c..) with each subdir... (0 Replies)
Discussion started by: bramya07
6. Shell Programming and Scripting
I've two files with data like below:
So,the field separator in file1.txt is a comma and in file2.txt,it is |
Now,the output should be... (2 Replies)
Discussion started by: asyed
7. Shell Programming and Scripting
I have a directory with a large # of files and in each file I am looking to match a string in one file with a string in the subsequent n file(s). If there is a match between a string in one file and a string in the next n file(s) then delete the subsequent duplicate file(s). Here is sample input:
... (2 Replies)
Discussion started by: sitney
8. Shell Programming and Scripting
I am trying to join/paste columns from two files for the rows with matching first field. Any help will be appreciated.
Files can not be sorted and may not have all rows in both files.
aaa sss mmmm
ccc kkkk llll
ddd xxx yyy
Want to... (1 Reply)
Discussion started by: sk_sd
9. Shell Programming and Scripting
I'm at SunOS 5.9
At my new job i'm using UNIX, and it's my first time.
i'm trying to make a script for:
-find files with a name passed to it as parameter
-compare results with file size passed as parameter too
-when comparison's true --> move file
-if not--> make nothing
... (3 Replies)
Discussion started by: viko
10. Shell Programming and Scripting
Can someone please help me figure out what the command syntax I need to use is?
Here is what I am wanting to do.
I have hundreds of thousands of files I need to look for a specific search string in.
These files are spread across multiple subdirectories from one main directory.
I would like... (4 Replies)
Discussion started by: btrotter