08-01-2019
Hello
fajar_3t3,
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?
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.
We're all here to learn and getting the relevant information will help us all.
Thanks, in advance,
Robin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have to send a file to mainframe and before sending it, I have to execute the quote command to set the record length.
Since the file is dynamic, I do not know what the maximum size of a line could be.
Currently, I use the following function to get the Max Column Count. Since I use "sed" it... (2 Replies)
Discussion started by: gemini
2 Replies
2. Shell Programming and Scripting
Hi Friends,
Can any one help me with count average of student marks in this file (i can not change structure of the input file):
input file:
1:John Smith:2 3 4 5
2:Mark Anderson:3 2
3:Susan Waterman:2 4 2
(numbers of marks are different)
output:
Name:John Smith
ID#: 1
Avg. mark:... (6 Replies)
Discussion started by: mleplawy
6 Replies
3. Shell Programming and Scripting
Hi Friends,
Can any one help me with count average of student marks in this file (i can not change structure of the input file):
input file:
1 - student ID
2 - student name
3 - group ID
4 - teacher ID
5 - marks (numbers of marks are different)
1:John Smith:2:3:2 3 4 5
2:Mark... (1 Reply)
Discussion started by: mleplawy
1 Replies
4. Shell Programming and Scripting
hey everybody ..
I have a problem when I use this command to count the Max number by awk it give to me 99 while there are numbers bigger than 99
awk 'NR==0 { temp = $0 ;next}
{ if ( $0 >= temp ) { temp=$0 } }
END{ print "Maximum Number:"temp""}' file
thank you for your help... (9 Replies)
Discussion started by: halola85
9 Replies
5. Shell Programming and Scripting
hi!
i have a file like the attachement.
I'd like to get for each line the min, max and average values. (there is 255 values for each line)
how can i get that ?
i try this, is it right?
BEGIN {FS = ","; OFS = ";";max=0;min=0;moy=0;total=0;freq=890}
$0 !~ /Trace1:/ {
... (1 Reply)
Discussion started by: riderman
1 Replies
6. Shell Programming and Scripting
I am redirecting my ping output to a file. The sample output is like this:
64 bytes from xx.xx.xx.167: icmp_seq=4490 ttl=116 3.75 ms 2011Jul12- 15 40 16
64 bytes from xx.xx.xx.167: icmp_seq=4491 ttl=116 5.29 ms 2011Jul12- 15 40 17
64 bytes from xx.xx.xx.167: icmp_seq=4492 ttl=116 4.88 ms... (6 Replies)
Discussion started by: zorrox
6 Replies
7. Shell Programming and Scripting
Hi ,
Below is my sample data,I have this 8 column(A,B,C,D,E,F,G,H) in csv file.
A , B ,C ,D ,E ,F,G ,H
4141,127337,24,15,20,69,72.0,-3
4141,128864,24,15,20,65,66.0,-1
4141,910053,24,15,4,4,5.0,-1
4141,910383,24,15,22,3,4.0,-1
4141,496969,24,15,14,6,-24.0,-18... (7 Replies)
Discussion started by: vinothsekark
7 Replies
8. Shell Programming and Scripting
Hi all,
I have a list of numbers. I need an awk command to find out the numbers of elements (number of numbers, sort to speak), the average value the min and max value. Reading the list only once, with awk.
Any ideas?
Thanks! (5 Replies)
Discussion started by: black_fender
5 Replies
9. Shell Programming and Scripting
Hi,
I have a file which looks like this:
FID IID MISS_PHENO N_MISS N_GENO F_MISS
12AB43131 12AB43131 N 17774 906341 0.01961
65HJ87451 65HJ87451 N 10149 906341 0.0112
43JJ21345 43JJ21345 N 2826 906341 0.003118I would... (11 Replies)
Discussion started by: kayakj
11 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
need your help, i want count respon time max and average my nginx logs, based on hourly or minutes per api...
my nginx.log sample :
10.1.1.1 - - "POST /v2/api/find/outlet/ HTTP/1.1" 200 2667 "-" "okhttp/3.12.0" "118.215.153.47" 0.178 0.178 .
10.1.1.1 - - "POST... (4 Replies)
Discussion started by: fajar_3t3
4 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)