Show/Hide Toolbars

Take Command / TCC Help v. 21

Navigation: TCC > Commands > VIEW > VIEW Command Line Options

Find String Option: /S

Scroll Prev Top Next More

 

The /S option is used to tell V to start displaying the file at the position of a string match.

 

The format of the /S command line option is as follows:

 

V Filename /S:SearchString /SO:[CWRHUB] /SN:n /SC:Columns

 

where

 

SO can contain a series of letters which correspond to the options in the search dialog box. These can be one of:

 

C                Match case

W                Word Only

R                Regular Expression

H                Hex/Binary

U                Unicode

B                Search backwards (from end of file)

 

SN indicates which occurrence of the string to find. By default, the first match is found (n=1).

 

SC can be used to restrict the search to certain columns.

 

If the search string contains spaces, you must enclose it in double quotes.

 

Examples

 

Start viewing at the second occurrence of "Error"

 

V Filename /S:Error /SN:2

 

 

Start viewing at the last line that contains the *word* "Error"

 

V Filename /S:Error /SO:WB

 

Note that the first example will match "errors", whereas the second will not.

 

 

Start viewing at the first line that *begins* with "Error Log"

 

V Filename /S:"^Error Log" /SO:R

 

 

Note

 

The /S parameter will not work on wild cards - you must specify a valid file name.

 

For example, you cannot specify "V *.txt /S:Error" hoping that V will display the first txt file that contains "Error"