EnglishFrenchSpanish

OnWorks favicon

cg - Online in the Cloud

Run cg in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command cg that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


cg - Recursively grep for a pattern and store it.

SYNOPSIS


cg [ -l ] | [ [ -i ] pattern [ files ] ]

DESCRIPTION


cg does a search though text files (usually source code) recursively for a pattern,
storing matches and displaying the output in a human-readable fashion. It is intended to
give some of the functionaly of AT&T's cscope(1) tool, with the advantages of simplicity
and not being language-specific. The script will colorize output if configured as such.

It is typically run with a Perl regular expression to search for. The search can be made
case insensitive by using the -i option. A list of files may also be specified with an
additional argument after the pattern. Put the files pattern in quotes to make it be
matched by Perl rather than by the shell. Running the script with no arguments will
recall the results of the previous search. After the search, entries found can be edited
using the vg(1) script. The -l option shows the last log made.

SOME EXAMPLES


cg - alone recalls the previous search results.

cg -i pattern - search the default list of files for all files matching the pattern (and
case-insensitively).

cg pattern '*.c' - search recursively for pattern in all *.c files. This automatically
converts '*' to '.*' and '.' to '\.' for you and does a Perl pattern match on all files in
the tree.

cg pattern *.c - search through the shell-expanded list of *.c files, so not done
recursively (in other words, only the files your shell pass to the script as arguments).

cg -l - show the last log made.

COMMAND-LINE OPTIONS


-i Do a case-insensitive search.

-l Show the last log made.

-p Toggle the default pager option. cg has a bulit-in pager function, which can be
enabled or disabled by default (in .cgvgrc). If the default is enabled, this option
disables the pager; if the default is disabled, this option enables it.

-P Force the built-in pager to be disabled.

Use cg online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Free Pascal Compiler
    Free Pascal Compiler
    A 32/64/16-bit Pascal compiler for
    Win32/64/CE, Linux, Mac OS X/iOS,
    Android, FreeBSD, OS/2, Game Boy
    Advance, Nintendo NDS and DOS;
    semantically compatible wi...
    Download Free Pascal Compiler
  • 2
    Canon EOS DIGITAL Info
    Canon EOS DIGITAL Info
    Canon doesn�t have shutter count
    included on the EXIF information of an
    image file, as opposed to Nikon and
    Pentax. There�s no official Canon based
    application ...
    Download Canon EOS DIGITAL Info
  • 3
    rEFInd
    rEFInd
    rEFInd is a fork of the rEFIt boot
    manager. Like rEFIt, rEFInd can
    auto-detect your installed EFI boot
    loaders and it presents a pretty GUI
    menu of boot option...
    Download rEFInd
  • 4
    ExpressLuke GSI
    ExpressLuke GSI
    This SourceForge download page was to
    grant users to download my source built
    GSIs, based upon phhusson's great
    work. I build both Android Pie and
    Android 1...
    Download ExpressLuke GSI
  • 5
    Music Caster
    Music Caster
    Music Caster is a tray music player
    that lets you cast your local music to a
    Google Cast device. On the first run,
    you will need to click the arrow in your
    tas...
    Download Music Caster
  • 6
    PyQt
    PyQt
    PyQt is the Python bindings for
    Digia's Qt cross-platform
    application development framework. It
    supports Python v2 and v3 and Qt v4 and
    Qt v5. PyQt is avail...
    Download PyQt
  • More »

Linux commands

Ad