Sponsored Content
Full Discussion: Searching Problem
Top Forums Shell Programming and Scripting Searching Problem Post 302363761 by zaxxon on Wednesday 21st of October 2009 09:41:12 AM
Old 10-21-2009
Ok, how you can specify filenames you are looking for and in which directories should be clear by now. Here is an example that might be ok for you:

Code:
$> find . -type f -exec grep -l OCT {} \; | while read LINE; do echo "Filename: $LINE"; cat $LINE; echo "----------> Trenner <----------"; done
Filename: ./yo
eins
zwei
OCT
drei
vier
----------> Trenner <----------
Filename: ./infile
16-SEP-2009 09:11:47 10.65.4.24
16-SEP-2009 09:11:47 10.3.4.11
30-SEP-2009 10:11:47 10.3.4.11
1-OCT-2009 10:11:47 10.65.4.24
6-OCT-2009 10:11:47 10.3.4.11
6-OCT-2009 12:31:01 10.3.4.11
16-OCT-2009 11:11:47 10.65.4.24
17-OCT-2009 11:11:47 10.65.4.24
18-OCT-2009 11:11:47 10.3.4.11
----------> Trenner <----------

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

searching for {

Hello, I am having a hard time trying to do the following: I have a file that looks like this: 0 CacheMaxConn 4 64 0 RMThread 16 3423423 7 DataSource 0 /hello/sas/ses 0 {94545B4-E343-1410-81E4-08000000} 3 DDBE 3 ... (4 Replies)
Discussion started by: yotoruja
4 Replies

2. UNIX for Dummies Questions & Answers

Searching in VI

Hi, I would like to do a search and replace on a file using vi. Something like this: :%s/dst_port=****//g I want to search the entire file and replace all text that does not match dst_port=**** with space or nothing. In other words delete everything except for dst_port=****. The four *... (1 Reply)
Discussion started by: andyblaylock
1 Replies

3. Shell Programming and Scripting

PERL: Searching for a string in a text file problem

Looking for a bit of help. I need to search for a string of words, but unfortunately these words are located on separate lines. for example the text output is: United Chanmpions Ronaldo Liverpool Losers Torres and my script code is print("DEBUG - checking file message"); while... (15 Replies)
Discussion started by: meevagh
15 Replies

4. Shell Programming and Scripting

problem while searching in a file by 'AWK'

Hi , i am writing a script in which i am using following command to grep some string and then storing it's output to v, as like below :- v=$(awk -F, '{ if ( $NF ~ /DEV/ ) print $0 "_BLD01";else print $0 "_RC01" }' mytest) Here i am facing following issues:- 1. it is searcing DEV in the... (1 Reply)
Discussion started by: inderpunj
1 Replies

5. UNIX for Dummies Questions & Answers

searching

How would i search to find all the lines consisting of of only the letter "z" followed by any four characters? (1 Reply)
Discussion started by: trob
1 Replies

6. Shell Programming and Scripting

Problem with searching and then editing a file through shell.

Hi, I have searched through this forum as there are many similar entries but could'nt get one of them to work, either that or they were just different to what I needed. Basically I have a file, recordsDatabase. In this file are a few different fields. There is a unique identifier eg 001... (5 Replies)
Discussion started by: U_C_Dispatj
5 Replies

7. UNIX for Dummies Questions & Answers

Searching

Hi guys, I have a very common issue :( im trying to work it out but I am still not used to it. my problem is searching. very often I should look for piece of string in a text file or a file itself: I want to learn some easy and professional commands to ease this routine for me. I want to be... (2 Replies)
Discussion started by: messi777
2 Replies

8. Shell Programming and Scripting

searching a file with a specified text without using conventional file searching commands

without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Discussion started by: arindamlive
5 Replies

9. Shell Programming and Scripting

Problem with the awk in searching the contents in a file

Hello all, I am a newbie in awk. I am struggling in this problem for a long.Actually I have two files, filea and fileb. File a is actually a search key through it I have to find the corresponding japanese tag from file b. filea contains the data like this: sm982882 sm1893548 sm2420025... (3 Replies)
Discussion started by: csim_mohan
3 Replies

10. Programming

Hsearch() problem when searching for strings.

I have written a code in C where the objective is to search for strings. There are two files: 1. Database file which has more than one billion entries. This file is read in argv in the C code below. The format of the file is like this: a.txt apple b.txt candle c.txt glue 2. There is another... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
SEQSORT(1e)						     EMBOSS Manual for Debian						       SEQSORT(1e)

NAME
seqsort - Remove ambiguous classified sequences from DHF files. SYNOPSIS
seqsort -dhfindir directory -overlap integer -dofamilies toggle -doambiguities toggle -dhfoutdir outdir -hitsfile outfile -ambigfile outfile seqsort -help DESCRIPTION
seqsort is a command line program from EMBOSS ("the European Molecular Biology Open Software Suite"). It is part of the "Protein:3D Structure" command group(s). OPTIONS
Input section -dhfindir directory This option specifies the location of DHF files (domain hits files) (input). A 'domain hits file' contains database hits (sequences) with domain classification information, in the DHF format (FASTA or EMBL-like). The hits are relatives to a SCOP or CATH family and are found from a search of a sequence database. Files containing hits retrieved by PSIBLAST are generated by using SEQSEARCH. Default value: ./ Required section -overlap integer This option specifies the number of overlapping residues required for merging of two hits. Each family is also processed so that ovlerapping hits (hits with identical accesssion number that overlap by at least a user-defined number of residues) are replaced by a hit that is produced from merging the two overlapping hits. Default value: 10 -dofamilies toggle This option specifies to write a domain families file. If this option is set a domain families file is written. Default value: N -doambiguities toggle This option specifies whether to write a domain ambiguities file. If this option is set a domain ambiguities file is written. Default value: N Output section -dhfoutdir outdir This option specifies the location of DHF files (domain hits files) (output). A 'domain hits file' contains database hits (sequences) with domain classification information, in the DHF format (FASTA or EMBL-like). The hits are relatives to a SCOP or CATH family and are found from a search of a sequence database. Files containing hits retrieved by PSIBLAST are generated by using SEQSEARCH. Default value: ./ -hitsfile outfile This option specifies the name of domain families file (output). A 'domain families file' contains sequence relatives (hits) for each of a number of different SCOP or CATH families found from searching a sequence database, e.g. by using SEQSEARCH (psiblast). The file contains the collated search results for the indvidual families; only those hits of unambiguous family assignment are included. Hits of ambiguous family assignment are assigned as relatives to a SCOP or CATH superfamily or fold instead and are collated into a 'domain ambiguities file'. The domain families and ambiguities files are generated by using SEQSORT and use the same format as a DHF file (domain hits file). Default value: fam.dhf -ambigfile outfile This option specifies the name of domain ambiguities file (output). A 'domain families file' contains sequence relatives (hits) for each of a number of different SCOP or CATH families found from searching a sequence database, e.g. by using SEQSEARCH (psiblast). The file contains the collated search results for the indvidual families; only those hits of unambiguous family assignment are included. Hits of ambiguous family assignment are assigned as relatives to a SCOP or CATH superfamily or fold instead and are collated into a 'domain ambiguities file'. The domain families and ambiguities files are generated by using SEQSORT and use the same format as a DHF file (domain hits file). Default value: oth.dhf BUGS
Bugs can be reported to the Debian Bug Tracking system (http://bugs.debian.org/emboss), or directly to the EMBOSS developers (http://sourceforge.net/tracker/?group_id=93650&atid=605031). SEE ALSO
seqsort is fully documented via the tfm(1) system. AUTHOR
Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org> Wrote the script used to autogenerate this manual page. COPYRIGHT
This manual page was autogenerated from an Ajax Control Definition of the EMBOSS package. It can be redistributed under the same terms as EMBOSS itself. DOMSEARCH 0.1.0++20100721 08/11/2010 SEQSORT(1e)
All times are GMT -4. The time now is 04:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy