10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello all, I am having trouble with what should be an easy task, but seem to be missing something fundamental. I have two files, with File 1 consisting of a single field of many thousands of records. I also have File 2 with two fields and many thousands of records.
My goal is that when $1 of... (2 Replies)
Discussion started by: jvoot
2 Replies
2. Shell Programming and Scripting
Hi all , I have two files : dblp.xml with dblp records and itu1.txt with faculty members records. I need to find out how many dblp records are related to the faculty members. More specific: I need to find out which names from itu1.txt are a match in dblp. xml file , print them and show how many... (4 Replies)
Discussion started by: iori
4 Replies
3. Shell Programming and Scripting
I have two files, want to compare file1 data with file2 second column and print line which are not matching. Need help in matching the pattern, file2 second column number can be leading 0 or 00 or 000.
Example:
file1
1
2
3
file2
a,0001
b,02
c,000
d,01
e,2
f,0005
Expected output:... (20 Replies)
Discussion started by: vegasluxor
20 Replies
4. Shell Programming and Scripting
Hi I am trying to find a pattern match with column one containing 3 numbers.
input file tmp.lst
abcd456|1|23123|123123|23423
kumadff|a|dadfadf|adfd|adfadfadf
xxxd999|d|adfdfs|adfadf|adfdasfadf
admin|a|dafdf|adfadfa|||
output file tmp4.lst
abcd456|1|23123|123123|23423... (3 Replies)
Discussion started by: vamsekumar
3 Replies
5. Shell Programming and Scripting
can somebody provide me with some ksh code that will return true if my the contents in my variable match anyone of these strings ORA|ERROR|SP2
variable="Error:ORA-01017: Invalid username/password; logon denied\nSP2-0640:Not connected"
I tried this and it does not seem to work for me
... (3 Replies)
Discussion started by: BeefStu
3 Replies
6. Shell Programming and Scripting
Hi ALL :).
i have a file,
cat 3 +
dog 5 +
rat 6 -
i want to print no of record having pattern "+".
thanks in advance :confused:. (2 Replies)
Discussion started by: admax
2 Replies
7. Shell Programming and Scripting
Hello. I just found out about awk, and it appears that this could handle the problem I'm having right now.
I first stumbled on the thread How to extract first and last line of different record from a file, and that problem is almost similar to mine.
In my case, an ASCII file will contain the... (0 Replies)
Discussion started by: Gonik
0 Replies
8. UNIX for Dummies Questions & Answers
I am curious if the following can be done in a file in unix. Let's say I have a flat file with the following data
AAA,12,2,,,,
BBB,3,1,,,,
CCC,,,,,
DDD,2,,,,,
SQQ,,,,,
ASJ,,3,5
I only want to capture the data with values into a new file. If the data contains the pattern ,,,,, as in... (2 Replies)
Discussion started by: mode09
2 Replies
9. Shell Programming and Scripting
2008 Tue Apr 22 00:11:50
1.0
2.1
4.0
2008 Tue Apr 22 00:26:51
4.0
5.0
6.2
With the above as the input file, I would like to output:
2008 Tue Apr 22 00:11:50
7.1
2008 Tue Apr 22 00:26:51
15.2
In other words add the (numeric) records between the records that start with 2008 (all the... (5 Replies)
Discussion started by: rowan_sen
5 Replies
10. Shell Programming and Scripting
In a nutshell, I need to work out how to return the last matching pattern from an awk //,// search. I can bring back the first, but am unsure how to obtain the last, and a simple tail won't work as the match could be over multiple lines.
Secondly I would like some way of pattern matching, a... (10 Replies)
Discussion started by: smb_uk
10 Replies