Grep

Datumsansicht Baumansicht Betreffansicht Attachement-Sicht

From: Messingschlager, Wolfgang (Wolfgang_Messingschlager_at_bmc.com)
Date: 30. Nov 2001


> -----Ursprüngliche Nachricht-----
> Von: Robert Braeutigam [mailto:robo_at_edv-sup.zew.de]
> Gesendet: Freitag, 30. November 2001 15:51
> An: Mathias Waack
> Cc: uugrn_at_uugrn.org
> Betreff: Re: Grep
>
>
>
>
> Hallo,
>
> aehm, ein einfaches man grep liefert mir die Optionen -A und -B:
>
> -A NUM, --after-context=NUM
> Print NUM lines of trailing context after matching
> lines.
> -B NUM, --before-context=NUM
> Print NUM lines of leading context before matching
> lines.

also ich habe das mal auf einer AIX gemacht:

$ grep -A 3 screen *.log
grep: illegal option -- A
usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] -e pattern_list...
        [-f pattern_file...] [file...]
usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] [-e
pattern_list...]
        -f pattern_file... [file...]
usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] pattern_list
[file...]
$ uname -a
AIX fra-aix-01 3 4 00D3501E4C00
$ man grep

----------------------------------------------------------------------------

---
                 AIX Version 4.3 Commands Reference, Volume 2
----------------------------------------------------------------------------
---

grep Command

Purpose

Searches a file for a pattern.

Syntax

grep [ -E | -F ] [ -i ] [ -h ] [ -s ] [ -v ] [ -w ] [ -x ] [ -y ] [ [ [ -b ] [ -n ] ] | [ -c | -l |-q ] ] [ -p [ Separator ] ] { [ -e PatternList ... ] [ -f PatternFile ... ] | PatternList ... } [ File ... ]

Description

The grep command searches for the pattern specified by the Pattern parameter and writes each matching line to standard output. The patterns are limited regular expressions in the style of the ed or egrep command. The grep command uses a compact non-deterministic algorithm. ...

und auf einer Solaris 8:

$ grep -A 3 tmp ll.log grep: Ungültige Option -- A Syntax: grep -hblcnsviw pattern file . . . $ uname -a SunOS fra-sun-02 5.8 Generic_108528-09 sun4u sparc SUNW,Ultra-5_10 $ man grep Seite wird neu formatiert. Bitte warten... fertig

User Commands grep(1)

NAME grep - search a file for a pattern

SYNOPSIS /usr/bin/grep [ -bchilnsvw ] limited-regular-expression [ filename ... ]

/usr/xpg4/bin/grep [ -E | -F ] [ -c | -l | -q ] [ -bhinsvwx ] -e pattern_list ... [ -f pattern_file ] ... [ file ... ]

/usr/xpg4/bin/grep [ -E | -F ] [ -c | -l | -q ] [ -bhinsvwx ] [ -e pattern_list ... ] -f pattern_file ... [ file ... ]

/usr/xpg4/bin/grep [ -E | -F ] [ -c | -l | -q ] [ -bhinsvwx ] pattern [ file ... ]

DESCRIPTION The grep utility searches text files for a pattern and $

> > Oder hab ich das jetzt furchtbar falsch verstanden ? > > Ciao, > > Robert > > > -- > ------------------------------------------------------------- > Robert Braeutigam (EDV/URL) > Zentrum fuer Europaeische Wirtschaftsforschung GmbH (ZEW) > L7,1 68161 Mannheim Tel.: +49(0)621 1235-272, > Fax.: +49(0)621 1235-224, -226 > email: braeutigam_at_zew.de http://www.zew.de > ------------------------------------------------------------- >


Datumsansicht Baumansicht Betreffansicht Attachement-Sicht

Dieses Archiv wurde generiert von hypermail 2.1.2 : 11. Mar 2002 CET