1 Copyright (c) 2002, International Business Machines Corporation and others. All Rights Reserved.
2 ugrep: a sample program demonstrating the use of ICU regular expression API.
4 usage: ugrep [options] pattern [file ...]
6 --help Output a brief help message
7 -n, --line-number Prefix each line of output with the line number within its input file.
8 -V, --version Output the program version number
11 The program searches for the specified regular expression in each of the
12 specified files, and outputs each matching line.
14 Input files are in the system default (locale dependent) encoding, unless they
15 begin with a BOM, in which case they are assumed to be in the UTF encoding
16 specified by the BOM. Program output is always in the system's default
21 ./ugrep.c source code for the sample
22 ./ugrep.dsw Windows MSVC workspace. Double-click this to get started.
23 ./ugrep.dsp Windows MSVC project file.
24 ./Makefile Makefile for Unixes. Needs gmake.
27 To Build ugrep on Windows
28 1. Install and build ICU
29 2. In MSVC, open the workspace file icu\samples\ugrep\ugrep.dsw
30 3. Choose a Debug or Release build.
34 1. Start a command shell window
35 2. Add ICU's bin directory to the path, e.g.
36 set PATH=c:\icu\bin;%PATH%
37 (Use the path to where ever ICU is on your system.)
38 3. cd into the ugrep directory, e.g.
39 cd c:\icu\source\samples\ugrep\debug
45 1. Build ICU. Specify an ICU install directory when running configure,
46 using the --prefix option. The steps to build ICU will look something
48 cd <icu directory>/source
49 runConfigureICU <platform-name> --prefix <icu install directory> [other options]
56 Put the install directory containing icu-config on the $PATH.
57 This will generally be <icu install directory>/bin
58 cd <icu directory>/source/samples/ugrep
62 cd <icu directory>/source/samples/ugrep
64 export LD_LIBRARY_PATH=<icu install directory>/lib:.:$LD_LIBRARY_PATH
68 Note: The name of the LD_LIBRARY_PATH variable is different on some systems.
69 If in doubt, run the sample using "gmake check", and note the name of
70 the variable that is used there. LD_LIBRARY_PATH is the correct name
71 for Linux and Solaris.