FIND + Finding Strings Within FilesLocates and displays all lines in a file or group of files
that contain a specified string.
VERSION
PC-DOS 2.0+
MS-DOS equivalent: FIND (2.0+)
TYPE
External
SYNTAX
[d:][path] FIND [C][/N] "string"
[sd:][spath]sfilename
OPTIONS
[d:][path] Specifies the drive letter and
path that contain the FIND
command file.
/V Displays all lines that do not
contain the string.
/C Displays a count of the lines
that contain the string.
/N Displays the line number of
each line found as well as the
line.
"string" Specifies the search string,
which can have up to 250
characters and must be
enclosed in double quotes.
Wildcards are not permitted.
[sd:][spath]sfilename Specifies the file to be
searched. FIND locates all
records or lines in the file
that match the specified
search string.
EXAMPLES
FIND "Oct. 28, 1988" INVOICES.TXT
locates and displays all lines containing the string "Oct. 28,
1988" in the file named INVOICES.TXT.
FIND "Oct. 28, 1988" INVOICES.TXT B:STMNTS.TXT
locates and displays all lines containing the string "Oct. 28,
1988" in the file named INVOICES.TXT on the default drive and the
file named STMNTS.TXT on drive B.
FIND C"Oct. 28, 1988" INVOICES.TXT
returns
---------- INVOICES.TXT: 201
indicating that 201 lines in the file did not contain the string.
FIND "Smith" INVOICES.TXT|FIND "Reno"
locates all of the lines in INVOICES.TXT that contain Smith.
Then, it passes this information to the FIND filter a second time
to locate all of the lines that also contain the city Reno. The
resulting output will display only those lines that contain both
Smith and Reno.
NOTE
Used with the MORE command, the output from FIND can be sent
to the screen one screen at a time.
------------------------------------------------------------------
[For related topics, press R]
SEE ALSO
MORE Command
Replaceable Parameters in Batch Files
SORT Command
file: /Techref/DOS/command/find.htm, 2KB, , updated: 1999/2/20 10:24, local time: 2024/11/28 01:22,
3.138.118.194:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/TECHREF/DOS/command/find.htm"> DOS command find</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.