04-30-2008
Quote:
Originally Posted by
Mr.Aketi
Hi,
You can get the expected output using for loop as follows.
for i in `cat file1 | awk {'print $1'}`
do
grep ${i} file2
done
Thanks,
Aketi...
its give me nothing
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to find files that have the ending of .out and that are older than 20 days. However, I cannot use find as I do not want to search in the directories that are underneath the directory that I am searching in.
How can this be done?? Find returns files that I do not want. (2 Replies)
Discussion started by: halo98
2 Replies
2. Shell Programming and Scripting
Yes , I have to find a file in unix without using any find or where commands.Any pointers for the same would be very helpful as i am beginner in shell scritping and need a solution for the same.
Thanks in advance.
Regards
Jatin Jain (10 Replies)
Discussion started by: jatin.jain
10 Replies
3. Shell Programming and Scripting
what is the find to command to find the files created last 30 days (5 Replies)
Discussion started by: rajkumar_g
5 Replies
4. Web Development
Hi,
A piece of script from Perl-cookbook I do not understand, and post here for explanation.
The purpose is to find the element in either array (union), and in both array (intersection). Thank you in advance.
@a=qw(1 3 5 6 7 8);
@b=qw(2 3 5 7 9);
foreach $e (@a, @b) {$union{$e}++ &&... (3 Replies)
Discussion started by: yifangt
3 Replies
5. Shell Programming and Scripting
Hi Friends,
I would like to be helped for the following issue I am currently stuck with
I have two files like the following
tom ram 10 20
hey bye 11 12
bus cat 20 30
put but 25 30
jak mok 11 12
fil don 76 57
bus cat 23 45
pan ban 09 78
put but 45 67
kis mis 23 45
I would like... (2 Replies)
Discussion started by: jacobs.smith
2 Replies
6. UNIX for Dummies Questions & Answers
Hello all,
this is my first and probably not my last question around here. I do hope you can help or at least point me in the right direction.
My question is as follows, I need to find files and possible folders which are not owner = AAA group = BBB with a said location and all sub folders ... (7 Replies)
Discussion started by: kilobyter
7 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I'd like to intersect two files by the 4th col of the first file and 6th col of the second file. This is the code I use:
awk 'NR==FNR{A;next}$6 File1 File2
However, this is only outputting the second file lines. I'd like to have both lines in a single line separated by a tab.
Thanks in... (25 Replies)
Discussion started by: a_bahreini
25 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I like to intersect two files based on their first columns. Here is the code which does the trick for me:
awk 'NR==FNR{A;next}$1 in A' file1 file2
However, this only looks for exact matches between the two files in the first column. I need them to be printed even if part of the string... (10 Replies)
Discussion started by: a_bahreini
10 Replies
9. Shell Programming and Scripting
I need to find a word '% Retail by State' in the folder /usr/sas/reports/RetailSalesTaxallocation.
When I tried like below,
-bash-4.1$ cd /usr/sas/reports/RetailSalesTaxallocation
-bash-4.1$ find ./ -name % Retail by State
find: paths must precede expression: Retail
Usage: find ... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies
10. Shell Programming and Scripting
The problem is this one. I tar and gzip files on remote server
find . -ctime -1 | tar -cvf transfer_dmz_start_daily.tar *${Today}*.*;
Command
find . -ctime -1
Doesn't find files without extension
.csv .txt
I have to collect all files for current day, when the program... (1 Reply)
Discussion started by: digioleg54
1 Replies