Sponsored Content
Operating Systems Solaris Help with parsing regex in tripwire Post 302925196 by Corona688 on Friday 14th of November 2014 12:54:58 PM
Old 11-14-2014
Yes please. They're all nearly the same question and closely related, so the same topic.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl parsing compared to Ksh parsing

#! /usr/local/bin/perl -w $ip = "$ARGV"; $rw = "$ARGV"; $snmpg = "/usr/local/bin/snmpbulkget -v2c -Cn1 -Cn2 -Os -c $rw"; $snmpw = "/usr/local/bin/snmpwalk -Os -c $rw"; $syst=`$snmpg $ip system sysName sysObjectID`; sysDescr.0 = STRING: Cisco Internetwork Operating System Software... (1 Reply)
Discussion started by: popeye
1 Replies

2. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

3. Shell Programming and Scripting

Converting perl regex to sed regex

I am having trouble parsing rpm filenames in a shell script.. I found a snippet of perl code that will perform the task but I really don't have time to rewrite the entire script in perl. I cannot for the life of me convert this code into something sed-friendly: if ($rpm =~ /(*)-(*)-(*)\.(.*)/)... (1 Reply)
Discussion started by: suntzu
1 Replies

4. UNIX for Dummies Questions & Answers

read regex from ID file, print regex and line below from source file

I have a file of protein sequences with headers (my source file). Based on a list of IDs (which are included in some of the headers), I'd like to print out only the specified sequences, with only the ID as header. In other words, I'd like to search source.txt for the terms in IDs.txt, and print... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

5. Shell Programming and Scripting

Parsing expect_out using regex in expect script

Hi, I am trying to write an expect script. Being a newbie in expect, maybee this is a silly doubt but i am stuck here. So essentially , i want the o/p of one router command to be captured . Its something like this Stats Input Rx : 1234 Input Bytes : 3456 My expect script looks ... (5 Replies)
Discussion started by: ashy_g
5 Replies

6. Solaris

Help with parsing regex in tripwire for Solaris 10 dfstab

Help with parsing regex in tripwire: the rule is" This test verifies that exported file systems do not have the "root=<host>" option specified." regex that does not work is : ^.*-o+(?=root=\S+|\S+,root=\S+).* the dfstab looks like this : # cat /etc/dfs/dfstab # Place... (1 Reply)
Discussion started by: bathija12
1 Replies

7. Solaris

Help with parsing regex in tripwire for Solaris 10 dfstab FQDN

Help with parsing regex in tripwire: the rule is" This test verifies that all exported file systems found in /etc/exports specify a fully qualified domain name containing "thecss.com" or a NIS netgroup.." regex that does not work is : ... (1 Reply)
Discussion started by: bathija12
1 Replies

8. Shell Programming and Scripting

Perl, RegEx - Help me to understand the regex!

I am not a big expert in regex and have just little understanding of that language. Could you help me to understand the regular Perl expression: ^(?!if\b|else\b|while\b|)(?:+?\s+){1,6}(+\s*)\(*\) *?(?:^*;?+){0,10}\{ ------ This is regex to select functions from a C/C++ source and defined in... (2 Replies)
Discussion started by: alex_5161
2 Replies

9. Shell Programming and Scripting

Sendmail K command regex: adding exclusion/negative lookahead to regex -a@MATCH

I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works: LOCAL_CONFIG # Kcheckaddress regex -a@MATCH +<@+?\.++?\.(us|info|to|br|bid|cn|ru) LOCAL_RULESETS SLocal_check_mail # check address against various regex... (0 Replies)
Discussion started by: RobbieTheK
0 Replies

10. UNIX for Beginners Questions & Answers

Help with understanding this regex in a Perl script parsing a 'complex' string

Hi, I need some guidance with understanding this Perl script below. I am not the author of the script and the author has not leave any documentation. I supposed it is meant to be 'easy' if you're a Perl or regex guru. I am having problem understanding what regex to use :confused: The script does... (3 Replies)
Discussion started by: newbie_01
3 Replies
GIT-CHERRY(1)							    Git Manual							     GIT-CHERRY(1)

NAME
       git-cherry - Find commits yet to be applied to upstream

SYNOPSIS
       git cherry [-v] [<upstream> [<head> [<limit>]]]

DESCRIPTION
       Determine whether there are commits in <head>..<upstream> that are equivalent to those in the range <limit>..<head>.

       The equivalence test is based on the diff, after removing whitespace and line numbers. git-cherry therefore detects when commits have been
       "copied" by means of git-cherry-pick(1), git-am(1) or git-rebase(1).

       Outputs the SHA1 of every commit in <limit>..<head>, prefixed with - for commits that have an equivalent in <upstream>, and + for commits
       that do not.

OPTIONS
       -v
	   Show the commit subjects next to the SHA1s.

       <upstream>
	   Upstream branch to search for equivalent commits. Defaults to the upstream branch of HEAD.

       <head>
	   Working branch; defaults to HEAD.

       <limit>
	   Do not report commits up to (and including) limit.

EXAMPLES
   Patch workflows
       git-cherry is frequently used in patch-based workflows (see gitworkflows(7)) to determine if a series of patches has been applied by the
       upstream maintainer. In such a workflow you might create and send a topic branch like this:

	   $ git checkout -b topic origin/master
	   # work and create some commits
	   $ git format-patch origin/master
	   $ git send-email ... 00*

       Later, you can see whether your changes have been applied by saying (still on topic):

	   $ git fetch	# update your notion of origin/master
	   $ git cherry -v

   Concrete example
       In a situation where topic consisted of three commits, and the maintainer applied two of them, the situation might look like:

	   $ git log --graph --oneline --decorate --boundary origin/master...topic
	   * 7654321 (origin/master) upstream tip commit
	   [... snip some other commits ...]
	   * cccc111 cherry-pick of C
	   * aaaa111 cherry-pick of A
	   [... snip a lot more that has happened ...]
	   | * cccc000 (topic) commit C
	   | * bbbb000 commit B
	   | * aaaa000 commit A
	   |/
	   o 1234567 branch point

       In such cases, git-cherry shows a concise summary of what has yet to be applied:

	   $ git cherry origin/master topic
	   - cccc000... commit C
	   + bbbb000... commit B
	   - aaaa000... commit A

       Here, we see that the commits A and C (marked with -) can be dropped from your topic branch when you rebase it on top of origin/master,
       while the commit B (marked with +) still needs to be kept so that it will be sent to be applied to origin/master.

   Using a limit
       The optional <limit> is useful in cases where your topic is based on other work that is not in upstream. Expanding on the previous example,
       this might look like:

	   $ git log --graph --oneline --decorate --boundary origin/master...topic
	   * 7654321 (origin/master) upstream tip commit
	   [... snip some other commits ...]
	   * cccc111 cherry-pick of C
	   * aaaa111 cherry-pick of A
	   [... snip a lot more that has happened ...]
	   | * cccc000 (topic) commit C
	   | * bbbb000 commit B
	   | * aaaa000 commit A
	   | * 0000fff (base) unpublished stuff F
	   [... snip ...]
	   | * 0000aaa unpublished stuff A
	   |/
	   o 1234567 merge-base between upstream and topic

       By specifying base as the limit, you can avoid listing commits between base and topic:

	   $ git cherry origin/master topic base
	   - cccc000... commit C
	   + bbbb000... commit B
	   - aaaa000... commit A

SEE ALSO
       git-patch-id(1)

GIT
       Part of the git(1) suite

Git 2.17.1							    10/05/2018							     GIT-CHERRY(1)
All times are GMT -4. The time now is 07:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy