Changing the first occurrence after matching a pattern
Hi,
I got a file which looks like this:
I would like to change only the first line which includes the "Status:" string after matching the line containing "Value B", so the output file should look like this:
Thanks in advance
Hi all,
I'm looking for some help. I have a file (very long) that is organized like below:
>Cluster 0
0 283nt, >01_FRYJ6ZM12HMXZS... at +/99%
1 279nt, >01_FRYJ6ZM12HN12A... at +/99%
2 281nt, >01_FRYJ6ZM12HM4TS... at +/99%
3 283nt, >01_FRYJ6ZM12HM946... at +/99%
4 279nt,... (4 Replies)
I need to count the number of occurrences of a pattern, say 'key', between each occurrence of a different pattern, say 'lu'.
Here's a portion of the text I'm trying to parse:
lu S1234L_149_m1_vg.6, part-att 1, vdp-att 1 p-reserver IID 0xdb
registrations:
key 4156 4353 0000 0000
... (3 Replies)
Hi all,
is there a simple way to obtain the line number of the i-th occurrence of a pattern?
I have
OCCURRENCE=`grep -io "${STRING_NAME}" ${1}-${8}${EXT}.out_bis| wc -l`
which tells me how many occurency I have. I would like to go through them and determine the line number and assign... (6 Replies)
Greetings,
I am writing a script which requires as a part, selecting all the lines between the first and last occurrence of a pattern.
I have an nawk alternative that is working. But thre should be a generic script that should run on all os viz, linux, sun , aix.
The awk script that i... (25 Replies)
Need to search a pattern occurrence (count) in a specified file.
Below is the details
$ cat fruits
apple apple
ball ball
apple
ball ball ball
apple apple apple
cat cat
cat cat cat
apple
apple
Note: If I'll use the grep command with -c option then it'll count the 1st occurrence in... (6 Replies)
Hi,
I have a file as below
select or create proc
/*comments*/
/*comments*/
/*comments*/
/*comments*/
( variables4 datatypes1,
variables1 datatypes2,
variables2 datatypes3,
variables3 datatypes2
)
some text some text
(
sometext some text
)
some text some text (3 Replies)
Hi,
I am getting crazy after days on looking at it:
Bash in Ubuntu 12.04.1
I want to do this:
pattern="system /path1/file1 file1"
new_pattern=" data /path2/file2 file2"
file to edit: data.db
- I need to search in the file data.db for the nth occurrence of pattern
- pattern must... (14 Replies)
Given an XML file that contains (NOT "consists of"):
</dict>
<key>system.</key>
<dict>
<key>rule</key>
<string>default</string>
</dict>
<key>system.burn</key>
... (9 Replies)
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
I am trying to use awk to extract and print the first ocurrence of NM_ and NP_ with a : before in each line. The input file is tab-delimeted, but the output does not need to be. The below does execute but prints all the lines in the file not just the patterns. Thank you :).
file tab-delimeted
... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT DEBIAN
xcmsqueryblack
XcmsQueryBlack(3) XLIB FUNCTIONS XcmsQueryBlack(3)NAME
XcmsQueryBlack, XcmsQueryBlue, XcmsQueryGreen, XcmsQueryRed, XcmsQueryWhite - obtain black, blue, green, red, and white CCC color specifi-
cations
SYNTAX
Status XcmsQueryBlack(XcmsCCC ccc, XcmsColorFormat target_format, XcmsColor *color_return);
Status XcmsQueryBlue(XcmsCCC ccc, XcmsColorFormat target_format, XcmsColor *color_return);
Status XcmsQueryGreen(XcmsCCC ccc, XcmsColorFormat target_format, XcmsColor *color_return);
Status XcmsQueryRed(XcmsCCC ccc, XcmsColorFormat target_format, XcmsColor *color_return);
Status XcmsQueryWhite(XcmsCCC ccc, XcmsColorFormat target_format, XcmsColor *color_return);
ARGUMENTS
ccc Specifies the CCC. Note that the CCC's Client White Point and White Point Adjustment procedures are ignored.
color_return
Returns the color specification in the specified target format for . The white point associated with the returned color specifi-
cation is the Screen White Point. The value returned in the pixel member is undefined.
target_format
Specifies the target color specification format.
DESCRIPTION
The XcmsQueryBlack function returns the color specification in the specified target format for zero-intensity red, green, and blue.
The XcmsQueryBlue function returns the color specification in the specified target format for full-intensity blue while red and green are
zero.
The XcmsQueryGreen function returns the color specification in the specified target format for full-intensity green while red and blue are
zero.
The XcmsQueryRed function returns the color specification in the specified target format for full-intensity red while green and blue are
zero.
The XcmsQueryWhite function returns the color specification in the specified target format for full-intensity red, green, and blue.
SEE ALSO XcmsCIELabQueryMaxC(3), XcmsCIELuvQueryMaxC(3), XcmsTekHVCQueryMaxC(3)
Xlib - C Language X Interface
X Version 11 libX11 1.5.0 XcmsQueryBlack(3)