12-28-2008
Help with grepping and line number
I need help with extracting data from a large file ~900mb. Below is how the data looks like,
line number value
1001 1
0000
... ...
5001 5
0000
6001 6
0000
... ...
10001 10
0000
... ...
100001 100
0000
basically i need to grep lines starting from line 1001 and keep grepping line data for every 1000 after that. this is because after a certain number of lines ******** is displayed for the values which is problematic for my usual grepping scheme and hence my need to use the grep line number method. any help on the command for doing this would be much appreciated
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Ok heres the situation.
I'm grepping for all running processes with the name system. but there are also processes running with the name systema. How do I just search for processes running just under the "system" user
Thanks in advance (1 Reply)
Discussion started by: fusion99
1 Replies
2. Shell Programming and Scripting
Having problem in using the grep command to select all possible combinations a number in a file. Example: 123, I would like to grep the numbers 123,132,213,231,312 and 321. (2 Replies)
Discussion started by: wperry
2 Replies
3. Shell Programming and Scripting
I have a pattern::
xldn3176bap>arj SOCRATES_MAIN_LNX | grep " FA "
10/04/2007 21:01 10/04/2007 21:01 FA 1776752/1 1
I want the line above this line and the line below it too. Can anyone tell me how it can be done?
- iAm4Free (4 Replies)
Discussion started by: iAm4Free
4 Replies
4. Shell Programming and Scripting
I've got a file which I am reading line by line (using read line) into a variable.
I then want to do a grep on that line to check for something. I've tried a number of methods none of which seem to work.
I thought I had it with the code below but for some reason it doesn't like it and comes... (4 Replies)
Discussion started by: QueryMaster
4 Replies
5. Shell Programming and Scripting
Hi,
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies
6. UNIX for Dummies Questions & Answers
How do you grep every nth line number from a file? (2 Replies)
Discussion started by: shabs1985
2 Replies
7. Shell Programming and Scripting
I've got this command that I've been using to find strings on the same line, say I'm doing a search for name:
find . -name "*" | xargs grep -i "Doe" | grep -i "John" > output.txt
This gives me every line in a file that has John and Doe in it. I'm looking to add a OR operator for the second... (5 Replies)
Discussion started by: Rally_Point
5 Replies
8. Shell Programming and Scripting
Hi,
I need a regular expression grepping all lines starting with '*' followed by a VARIOUS number of blanks and then followed by the string 'Runjob=1'.
I tried that code, but it doesn't work:
grep -i '*'+'Runjob=1' INPUT_FILE >>OUTPUT_FILE
Can someone help me?
Thanks (8 Replies)
Discussion started by: ABE2202
8 Replies
9. Shell Programming and Scripting
I want to grep out a part of a snort rule based on the SID given, but all i want as the output is the part in the quotes after the msg: An example line looks something like this:
alert tcp any any -> 127.0.0.1 any (msg:"Example Message"; classtype:Example; sid:123456;)
I would want it to... (7 Replies)
Discussion started by: riott
7 Replies
10. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Discussion started by: grc
5 Replies
LEARN ABOUT OPENSOLARIS
mlib_videocoloruyv444int_to_argbint
mlib_VideoColorUYV444int_to_ARGBint(3MLIB) mediaLib Library Functions mlib_VideoColorUYV444int_to_ARGBint(3MLIB)
NAME
mlib_VideoColorUYV444int_to_ARGBint - color convert UYV interleaved to ARGB interleaved
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
void mlib_VideoColorUYV444int_to_ARGBint(mlib_u32 *ARGB,
const mlib_u8 *UYV, const mlib_u8 *A_array,
mlib_u8 A_const, mlib_s32 w,
mlib_s32 h, mlib_s32 dlb,
mlib_s32 slb, mlib_s32 alb);
DESCRIPTION
The UYV pixel stream is converted into an ARGB pixel stream. All pixel components are 8-bit unsigned integers. All buffers have dimensions
w and h.
The alpha values for this function work in the following fashion:
o If A_array pointer is not NULL, the values are taken from there. It has to have the same dimensions as the Y buffer.
o If A_array pointer is NULL, the alpha values for every pixel are set to A_const.
The following equation is used:
|R| |1.1644 0.0000 1.5966| [|Y| | 16.0000|]
|G| = |1.1644 -0.3920 -0.8132| * [|U| - |128.0000|]
|B| |1.1644 2.0184 0.0000| [|V| |128.0000|]
PARAMETERS
The function takes the following arguments:
ARGB Pointer to output buffer.
UYV Pointer to input buffer.
A_array Array of alpha values.
A_const Constant alpha value.
w Image width in pixels.
h Image height in lines.
dlb Linebytes for output buffer.
slb Linebytes for input buffer.
alb Linebytes for alpha buffer.
RETURN VALUES
None.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
mlib_VideoColorYUV420seq_to_ARGBint(3MLIB), mlib_VideoColorYUV411seq_to_ARGBint(3MLIB), mlib_VideoColorYUV422seq_to_ARGBint(3MLIB),
mlib_VideoColorYUV444seq_to_ARGBint(3MLIB), mlib_VideoColorYUV420seq_to_ABGRint(3MLIB), mlib_VideoColorYUV411seq_to_ABGRint(3MLIB),
mlib_VideoColorYUV422seq_to_ABGRint(3MLIB), mlib_VideoColorYUV444seq_to_ABGRint(3MLIB), mlib_VideoColorYUYV422int_to_ARGBint(3MLIB),
mlib_VideoColorYUV444int_to_ARGBint(3MLIB), mlib_VideoColorYUYV422int_to_ABGRint(3MLIB), mlib_VideoColorYUV444int_to_ABGRint(3MLIB),
mlib_VideoColorUYVY422int_to_ARGBint(3MLIB), mlib_VideoColorUYVY422int_to_ABGRint(3MLIB), mlib_VideoColorUYV444int_to_ABGRint(3MLIB),
attributes(5)
SunOS 5.11 2 Mar 2007 mlib_VideoColorUYV444int_to_ARGBint(3MLIB)