Sponsored Content
Full Discussion: Searching for text in files
Operating Systems Linux Searching for text in files Post 46645 by GandalfWhite on Wednesday 21st of January 2004 11:27:11 AM
Old 01-21-2004
Searching for text in files

Is there anyway that I can run a search of all files for matching strings(or even just a subset of all files) from the command line on Linux system? e.g check all files in the current directory that have 'cisco' in them........

find doesnt seem to be right as it only(well it appears to me anyway!) searches for files(true?)

Help me....... please??!! Smilie

-------------------------------------------------------------
'Just say to the new guy "STFU, STFD & RTFM!!"'
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with searching a text file

Hello all! I've been working for days on this and it is really bugging me!! Here's my dilemma: Say I have a very large text file which contains fields delimited my a ':' which logs various records. Each record is separated by a newline character, therefore I can search for lines with... (6 Replies)
Discussion started by: thekid2
6 Replies

2. UNIX for Dummies Questions & Answers

searching text question

If I am searching through a text file, and it is setup in hierarchical fashion. ie: Memory: 256 MB DDR Kingston CPU: UltraSparc 800 Mhz can i somehow search for CPU and pull out lines below it as well? Like grep only pulls that one line, i want that line... (4 Replies)
Discussion started by: BG_JrAdmin
4 Replies

3. UNIX for Dummies Questions & Answers

searching text files on specific columns for duplicates

Is it possible to search through a large file full of rows and columns of text and retrieve only the rows that contain duplicates fields, searchiing for duplicates on col4 & col6 Sample below Col1 col2 col3 col4 col5 col6 G405H SURG FERGUSON ... (2 Replies)
Discussion started by: Gerry405
2 Replies

4. UNIX for Dummies Questions & Answers

Searching directory for file that contains some text.

If I go into a directory and type in .. more * | grep foo I get the lines of text that contain foo in all of the files in the directory out of all of the files that are there. How do I make it so I can find out what the names of the files are that contain that text "foo"? By doing what I... (4 Replies)
Discussion started by: LordJezo
4 Replies

5. UNIX for Dummies Questions & Answers

Hi! Searching for a text string in UNIX

Hi! I'm new here and glad to meet everyone! I've been wrestling with a problem lately however! How do I recursively (recursive means to keep going through the subdirectories until no more are there) search a bunch of textfiles in a long directory structure for a specific string.. but only... (1 Reply)
Discussion started by: skwadim
1 Replies

6. Shell Programming and Scripting

Searching and extracting text from output

I have the following output which I need to obtain the values for "Next Seq is xxx" and "Last Seq is xxx" and "Pending count is xxx". You will notice that the number of words prior to that value can be variable hence the reason for asking this question. LINECMD> Line /xxx///ABC9_SND is UP.... (3 Replies)
Discussion started by: sjday
3 Replies

7. UNIX for Advanced & Expert Users

Searching filenames containing certain text???

Suppose there are multiple files containing certain text "abc". How to print the name of all such files with a single command from unix prompt? Thanks in advance (6 Replies)
Discussion started by: skyineyes
6 Replies

8. Shell Programming and Scripting

searching a text string for n'th :

hello, i'm a novice on bsh scripting so thanks for any help here basically i have a shell var $x that looks like this > echo $x nabc1234:!:73394:17155:Gary Mason:/home/garym:/bin/ksh and i'm trying to keep the first 8 characters and the text from the 4th : to the 5th : i've been trying... (9 Replies)
Discussion started by: sasglm
9 Replies

9. 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

10. Shell Programming and Scripting

Need help searching through a text file.

I'm trying to get one specific number out of a text file, in order to use as part of an algorithm in a shell script. It will always come after a specific string and that string won't appear anywhere else in the file. So I'm trying to search through the file for that one string, then grab the... (2 Replies)
Discussion started by: mikedigornio
2 Replies
depord(8)						      System Manager's Manual							 depord(8)

NAME
depord - Sort subset names into dependency order SYNOPSIS
/usr/lbin/depord [-c ctrldir [-c ctrldir]...] [-f [namefile | -]] [-I | -i] [subsetID [subsetID...]] OPTIONS
Searches the directory ctrldir for subset *.ctrl files instead of the current directory. You can use multiple -c options. Reads the subset names from namefile. If you use the "-" argument instead of namefile, read the subset names from standard input. The namefile and "-" argu- ments to the -f option are mutually exclusive. If you also specify subset names with subsetID operands, they are concatenated with the sub- set names specified with the -f option. Includes in the ordered output the names of all prerequisite subsets for the subset name argument list. The -I and -i options are mutually exclusive. Includes in the ordered output the names of all prerequisite subsets for the subset name argument list, and excludes from the output any prerequisite subsets that are already installed. The -I and -i options are mutually exclusive. OPERANDS
The name of a subset for dependency checking and ordering. If you also specify subset names with the -f option, they are concatenated with subsetID operands. DESCRIPTION
The depord command reads the subset *.ctrl files in the specified directories for dependency information, then sorts the subset name argu- ment list (and, optionally, prerequisite subset names) in dependency order. If other directories are not specified, depord searches for subset *.ctrl files in the current directory. If you install the subsets in the order shown in the depord output, subset dependencies are satisfied. If you are not using either the -I or -i option and if a subset dependency cannot be satisfied by the other specified subset names, an error message displays and that subset is not included in the output. All subsets in a dependency cycle (where subsets are mutu- ally dependent) are ignored. An error message displays, and those subsets are not included in the output. The depord command is used by the setld(8) utility. EXAMPLES
To sort the subsets listed on the command line into dependency order: # /usr/lbin/depord OSFCDEDT500 OSFX11500 OSFCDEMIN500 OSFX11500 OSFCDEMIN500 OSFCDEDT500 To use the -I option to list the prerequisite subsets for OSFDCEDT500, sorted into dependency order: # /usr/lbin/depord -I OSFCDEDT500 OSF- BASE500 OSFX11500 OSFCLINET500 OSFNFS500 OSFCDEMIN500 OSFCDEDT500 To use the -i option to check the prerequisite subsets for OSFDCEDT500, and exclude from the output those that are already installed: # /usr/lbin/depord -i OSFCDEDT500 OSFCDEDT500 RESTRICTIONS
The -I and -i options are mutually exclusive. FILES
Executable file for depord command Indicates subsetID is already installed. Contents list other subsets dependent upon subsetID. Control files with dependency information SEE ALSO
setld(8) stl_ctrl(4) Programming Support Tools depord(8)
All times are GMT -4. The time now is 09:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy