Sponsored Content
Top Forums Shell Programming and Scripting What does "!{$!..." means in sed ? Post 302993259 by bakunin on Wednesday 8th of March 2017 05:05:59 AM
Old 03-08-2017
Quote:
Originally Posted by ade05fr@yahoo.f
i have this command but i have some difficulty to understand it
Generally: commands in one-liner style do not enhance the readability all too much. If you don't understand it it is a good idea to first write it out, like i have done:


Code:
sed -n '/{/ ! b          # Line rule ("!"=NOTted): if line (not) contains "{", branch
        :a               # target for branching
        /}/ ! {          # line rule (NOTted again): if line (not) contains "}" do
              $ ! {      # line rule (NOTted again): if line is (not) the last line, do
                    N    # append next line to pattern space
                    ba   # branch to target a (see above, line 2)
                  }
              }
        {                # i don't understand this bracket
            /}/p         # line rule: if line contains "}" print it
        }' test.trc

I hope this helps.

bakunin
These 3 Users Gave Thanks to bakunin For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Any idea what this counter means "tcpTimRetrans"

I am chasing an issue where I see drop packets, in order to dig the problem further I issue netstat -s -P tcp command which shows me the stats from the tcp perspective. In that stats I see a counter which is "tcpTimRetrans" which increments along with "tcpRetransSegs". When both of these counter... (3 Replies)
Discussion started by: purechgo
3 Replies

2. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

3. Shell Programming and Scripting

What "-a" operator means in "if" statement

Hi I am trying to figure out what the following line does, I work in ksh88: ] && LIST="$big $LIST" Not sure what "-a" means in that case. Thanks a lot for any advice -A (1 Reply)
Discussion started by: aoussenko
1 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. What is on Your Mind?

What does "Eris Free" means, from the acronym EFNET

Ok so I have searched google pretty exstensively to find this out, no luck so far . . . Basically I wanted to know what "Eris Free" means, from the acronym EFNET. I was thinking that Eris is generally to do with discordianism, but have so far only found it as a reference to... (2 Replies)
Discussion started by: U_C_Dispatj
2 Replies

6. UNIX for Advanced & Expert Users

What does "__FD_PRN_" means in perl code ?

I have seen something like this in a perl code: $_ =~ s/__FD_PRN_/\\(/g What does this "__FD_PRN_" means. I have searched google but was not able to find any info regarding this. Appreciate if some one can refer to a link for these characters. From comments/code it used to substitue "(" with... (3 Replies)
Discussion started by: sarbjit
3 Replies

7. Shell Programming and Scripting

Using sed to find text between a "string " and character ","

Hello everyone Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
Discussion started by: haggismn
10 Replies

8. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

9. Solaris

Means to check if some process is running on "n" number of machines

Team, I would like to know, if we have any command in Solaris to verify, if some process is listening on a port on a set of machines. for eg: Wrote the below script, and found that when a process is listening on that port, then it just waits there and doesnt come out. Rather, I would like... (6 Replies)
Discussion started by: msgforsunil
6 Replies

10. UNIX for Beginners Questions & Answers

What does "force devmap reload" as in "multipath -r" means for my system and stability of my system?

Cannot present unpresented disks back again. On a test server tried this as a solution "multipath -r" and it worked. Too worried to try it in production before I know all the information. Any info would be appreciated! Also some links to the documentation on this specific issue could help a... (1 Reply)
Discussion started by: jsteppe
1 Replies
Gendarme(Gendarme 2.6.2.0)												Gendarme(Gendarme 2.6.2.0)

NAME
Gendarme - Rule-based code analysis for Mono. FILE FORMATS
ignore-file This file is used to filter out defects from gendarme reports. It uses a line oriented file format where the first characters of the line control the interpretation of the line: # - means that the line is a comment. R: - if the full name of a rule to be filtered. A: - is used to filter out an assembly (the extension can be omitted). T: - is used to filter out a namespace qualified type name. M: - is used to filter out a method. It must contain the full method name as it appears in the report. rules.xml This file is used in conjunction with the --set option to control and configure the rules used by Gendarme. It contains a set of named rules (rule sets) and each rule set contains a list of rules. Rules have required from and include attributes, optional exclude and applyTo attributes, and optional parameter child elements. The from attribute is the path of a dll to load ("Gendarme.Rules.BadPractice.dll"). Relative paths are relative to the gendarme executable. The include attribute may be "*" to match every rule in the dll or a list of rule names separated by '|' ("WhizBangRule | MyRule"). The exclude attribute is a list of rule names separated by '|' ("IckyRule"). These will override any rules matched by the include attribute. The applyTo attribute may be "all", "visible", or "nonvisible". If it is all (the default) then all types in the assemblies are checked, if it is visible then only the externally visible types are checked, if it is nonvisible then only the internally visible types are checked. The parameter child element is used to customize the behavior of a rule within a dll. It has three required attributes: rule, prop- erty, and value. rule is the name of the applicable rule ("AvoidSmallNamespaceRule"), property is the name of a public property in the rule ("Minimum"), value is the value to assign to the property ("10"). gendarme.exe.config Used by debug versions of Gendarme to enable logging for rules. A config file will be generated automatically by the make file. To enable logging for a rule edit the config file, add a switch using the rule's name, and set the value to 1. COPYRIGHT
Copyright (C) 2005-2009 Novell, Inc (http://www.novell.com) MAILING LISTS
Mailing lists are listed at the http://groups.google.com/group/gendarme WEB SITE
http://www.mono-project.com/Gendarme SEE ALSO
gendarme(1) Gendarme(Gendarme 2.6.2.0)
All times are GMT -4. The time now is 02:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy