12-28-2017
Hello
newbie_01,
I have a few to questions pose in response first:-
- Is this homework/assignment? There are specific forums for these.
- What have you tried so far?
- What output/errors do you get?
- What OS and version are you using?
- What are your preferred tools? (C, shell, perl, awk, etc.)
- What logical process have you considered? (to help steer us to follow what you are trying to achieve)
Most importantly,
What have you tried so far?
I'm not too clear what you intention is, but if you can numerically sort the data (or it already is) and pass it through
grep, the
-A and/or
-B flags may do what you want.
There are probably many ways to achieve most tasks, so giving us an idea of your style and thoughts will help us guide you to an answer most suitable to you so you can adjust it to suit your needs in future.
Kind regards,
Robin
10 More Discussions You Might Find Interesting
1. SCO
hi
My problem now is that if shipping options as -o length = 88
it says the following:
# lp -o length=88 -dhp4015 /etc/hosts
UX:lp: ERROR: The following options can't be handled:
-o length=
TO FIX: The printer(s) that otherwise qualify
for printing your request can't handle
one or more of... (2 Replies)
Discussion started by: Edgar Guevara
2 Replies
2. Shell Programming and Scripting
Hi,
Anyone help me to print the lines from the flat file between 879th line number and 1424th line number.
The 879 and 1424 should be passed as input to the shell script(It should be dynamic).
Can any one give me using sed or awk?
I tried using read, and print the lines..Its taking too... (3 Replies)
Discussion started by: senthil_is
3 Replies
3. Shell Programming and Scripting
Hi all,
on Solaris 10, I'd like to print a range of lines starting at pattern but also including the very first line before pattern.
the following doesn't print the range starting at pattern and going down to the end of file: cat <my file> | sed -n -e '/<pattern>{x;p;}/'
I need to include the... (1 Reply)
Discussion started by: siriche
1 Replies
4. Shell Programming and Scripting
Hello guys,
I am a beginner in Unix :wall: and was wondering if anyone could help me.
I need a script that prints lines that only has Z-value lower than equals to (<=) 1.0e-02. Each column is seperated by a tab.
10009.fd Z-value = 3.62843e-03
10009.fd Z-value = 9.75489e-01... (3 Replies)
Discussion started by: narachaid
3 Replies
5. Shell Programming and Scripting
Hi,
I have a file as below
This is the line one
This is the line two
<\XMLTAG>
This is the line three
This is the line four
<\XMLTAG>
Output of the SED command need to be as below.
This is the line one
This is the line two
<\XMLTAG>
Please do the need to needful to... (4 Replies)
Discussion started by: RMN
4 Replies
6. Shell Programming and Scripting
Hi Guru's,
I am trying to grep a range of line numbers (based on match) and then look for another match which starts with a special character '$' and print the line number. I have the below code but it is actually printing the line number counting starting from the first line of the range i am... (15 Replies)
Discussion started by: Kevin Tivoli
15 Replies
7. Shell Programming and Scripting
Hi,
In an ideal scenario, I will have a listing of db transaction log that gets copied to a DR site and if I have them all, they will be numbered consecutively like below.
1_79811_01234567.arc
1_79812_01234567.arc
1_79813_01234567.arc
1_79814_01234567.arc
1_79815_01234567.arc... (3 Replies)
Discussion started by: newbie_01
3 Replies
8. Shell Programming and Scripting
In the awk below I am trying to print out those lines in file2 that are no between $2 and $3 in file1. Both files are
tab-delimeted and I think it's close but currently it is printeing out the matches. The --- are not part of the files they are just to show what lines match or fall into
the range... (6 Replies)
Discussion started by: cmccabe
6 Replies
9. UNIX for Beginners Questions & Answers
I have a directory of files, I can show the number of lines in each file and order them from lowest to highest with:
wc -l *|sort
15263 Image.txt
16401 reference.txt
40459 richtexteditor.txt
How can I also print the number of unique lines in each file?
15263 1401 Image.txt
16401... (15 Replies)
Discussion started by: spacegoose
15 Replies
10. UNIX for Beginners Questions & Answers
Hi I am having a code as stated below
module abcd( a , b , c ,da , fa, na , ta , ma , ra ,
ta, la , pa );
input a , b, da ,fa , na , ta , ma;
output c , ra ,ta ,
la ,pa ;
wire a , b , da , fa ,na ,
ta , ma;
endmodule
I need to match the string... (1 Reply)
Discussion started by: kshitij
1 Replies
LEARN ABOUT DEBIAN
string::parity
Parity(3) User Contributed Perl Documentation Parity(3)
NAME
String::Parity, setEvenParity, setOddParity, setSpaceParity, setMarkParity, isEvenParity, isOddParity isSpaceParity, isMarkParity, Even-
Bytes, OddBytes, SpaceBytes, MarkBytes, showParity, showMarkSpace - Parity (odd/even/mark/space) handling functions
SYNOPSIS
use String::Parity;
use String::Parity qw(:DEFAULT /show/);
DESCRIPTION
setEvenParity LIST
Copies the elements of LIST to a new list and converts the new elements to strings of bytes with even parity. In array context
returns the new list. In scalar context joins the elements of the new list into a single string and returns the string.
setOddParity LIST
Like setEvenParity function, but converts to strings with odd parity.
setSpaceParity LIST
Like setEvenParity function, but converts to strings with space (High bit cleared) parity.
setMarkParity LIST
Like setEvenParity function, but converts to strings with mark (High bit set) parity.
EvenBytes LIST
Returns the number of even parity bytes in the elements of LIST.
OddBytes LIST
Returns the number of odd parity bytes in the elements of LIST.
SpaceBytes LIST
Returns the number of space parity bytes in the elements of LIST.
MarkBytes LIST
Returns the number of mark parity bytes in the elements of LIST.
isEvenParity LIST
Returns TRUE if the LIST contains no byte with odd parity, FALSE otherwise.
isOddParity LIST
Returns TRUE if the LIST contains no byte with even parity, FALSE otherwise.
isSpaceParity LIST
Returns TRUE if the LIST contains no byte with mark parity, FALSE otherwise.
isMarkParity LIST
Returns TRUE if the LIST contains no byte with space parity, FALSE otherwise.
showParity LIST
Like setEvenParity function, but converts bytes with even parity to 'e' and other bytes to 'o'. The function showParity must be
imported by a specialised import list.
showMarkSpace LIST
Like setEvenParity function, but converts bytes with space parity to 's' and other bytes to 'm'. The function showMarkSpace must
be imported by a specialised import list.
NOTES
Don't use this module unless you have to communicate with some old device or protocol. Please make your application 8 bit clean and use the
internationally standardised ISO-8859-1 character set.
AUTHOR
Winfried Koenig <win@in.rhein-main.de>
SEE ALSO
perl(1), Exporter(1)
perl v5.8.0 1996-12-10 Parity(3)