Sponsored Content
Full Discussion: Error type order
Top Forums Shell Programming and Scripting Error type order Post 302658301 by bmk on Tuesday 19th of June 2012 06:28:52 AM
Old 06-19-2012
Error type order

Hi all,
Sample data file...

Code:
9f680197||y|a|6
9f6801||6
9f68017|20120511|y|6
9f68017|y|1
9f68017|6
9f68017|20120511|N|2
9f68017|MD|212343907|20120511|N|2
9f68017212343907|20120511|N|2
9f68017N|3
9f68017|20120511|y|3
9f68017|MD|212343907|20120511|N|3
9f68017|MD|212343907|20120511|y|3
9f68017|N|4
9f68017|y|4
9f68017|N|4
9f68017|20120511|y|4
9f68017|Y|4
9f68017|N|4
9f68017|MD|212343907|20120511|n|4
9f68017|Baltimore|MD|212343907|20120608|N|4

if i use this command ,output as below

Code:
nawk -F "|" '{a[$NF]++;}END{for(i in a)print "Error type "i":", a[i];}' test.txt

Code:
Error type 2: 3
Error type 3: 4
Error type 4: 8
Error type 6: 4
Error type 1: 1

excepted output is
Code:
Error type 1: 1
Error type 2: 3
Error type 3: 4
Error type 4: 8
Error type 6: 4

Please help me...

Thanks,
 

9 More Discussions You Might Find Interesting

1. Programming

Error : ANSI C++ forbids 'xx' declaration with no type

Hi All, I am not sure if this is the correct place to put this question but still i hope to get some info. I am compiling a c++ program on solaris 8 using c++ command, i get an error stating "ANSI C++ forbids declaration `genericerror' with no type" What could be the problem.... (2 Replies)
Discussion started by: zing
2 Replies

2. Solaris

Unknown File Type error

Greetings there, i was trying to install an eclipse plugin on sunOS 4.x for the solaris sparc platform, and i got the following error: /usr/project/RAServer/bin> ./RAStart.sh Starting Agent Controller ld.so.1: RAServer: fatal: /usr/project/RAServer/lib/libxerces-c.so.24: unknown file type... (3 Replies)
Discussion started by: rohitsz
3 Replies

3. Programming

array type has incomplete element type

Dear colleagues, One of my friend have a problem with c code. While compiling a c program it displays a message like "array type has incomplete element type". Any body can provide a solution for it. Jaganadh.G (1 Reply)
Discussion started by: jaganadh
1 Replies

4. Programming

error: field has incomplete type

Hello there, Here is how it goes - I have written a small test driver as an exercise to "Linux Device Drivers" and as a preparation for writing a real, functional driver. For the sake of seeing how far I got it working (I already implemented the open(0, read(), write() and ioctl() calls) I... (4 Replies)
Discussion started by: boyanov
4 Replies

5. Programming

error: field `fatx_i' has incomplete type

I'm trying to compile a 2.4.26 kernel but I have to apply two patches to it. The patches are: linux-2.4.26-xbox.patch openMosix-2.4.26-1 This is the reason that it doesn't compile. There is only one error but I'm not familiar with C or C++(Unfortunately only Java and some lower-level... (2 Replies)
Discussion started by: lateralus01
2 Replies

6. SCO

Error: Value too large for defined data type

Hi all, I have this problem in one of the SCO UNIXWare 7.1.4. We have an application which is working on hundreds of machines. When we try to install the same application on a new machine, the executable/binary gives the following error and exits... "xxx startup failure: Value too large for... (1 Reply)
Discussion started by: chava01
1 Replies

7. UNIX for Dummies Questions & Answers

Build Error: error: dereferencing pointer to incomplete type

I'm getting the following Error: prepare_pcap.c: In function `prepare_pkts': prepare_pcap.c:127: error: dereferencing pointer to incomplete type prepare_pcap.c:138: error: dereferencing pointer to incomplete type ==================================== This is the part of the relevant... (8 Replies)
Discussion started by: katwala
8 Replies

8. Red Hat

What type of error is this?

:rolleyes::rolleyes::rolleyes: Jul 18 19:31:31 plbp1s sendmail: STARTTLS: read error=syscall error (-1), errno=104, get_error=error:00000000:lib(0):func(0):reason(0) ---------- Post updated at 03:08 AM ---------- Previous update was at 03:07 AM ---------- # cat /var/log/maillog|egrep -i... (2 Replies)
Discussion started by: manalisharmabe
2 Replies

9. Programming

Logical Error With Type Conversion In C

So, I'm into about 650 lines of some code I'm working on. So I'll try to explain instead of flooding this post. Say I have some code like this: int main() { int i, j; char data; printf("Gimme something: "); fgets(data, INPUT_BUFF, stdin); for (j = 0; j < data; j++){... (6 Replies)
Discussion started by: Azrael
6 Replies
Error Handling Helpers(3)					   globus common					 Error Handling Helpers(3)

NAME
Error Handling Helpers - Error Match globus_bool_t globus_error_match (globus_object_t *error, globus_module_descriptor_t *module, int type) Print Error Chain char * globus_error_print_chain (globus_object_t *error) Print User Friendly Error Message char * globus_error_print_friendly (globus_object_t *error) Detailed Description Helper functions for dealing with Globus Generic Error objects. This section defines utility functions for dealing with Globus Generic Error objects. Function Documentation globus_bool_t globus_error_match (globus_object_t *error, globus_module_descriptor_t *module, inttype) Check whether the error originated from a specific module and is of a specific type. This function checks whether the error or any of it's causative errors originated from a specific module and is of a specific type. If the module descriptor is left unspecified this function will check for any error of the specified type and vice versa. Parameters: error The error object for which to perform the check module The module descriptor to check for type The type to check for Returns: GLOBUS_TRUE - the error matched the module and type GLOBUS_FALSE - the error failed to match the module and type char* globus_error_print_chain (globus_object_t *error) Return a string containing all printable errors found in a error object and it's causative error chain. If the GLOBUS_ERROR_VERBOSE env is set, file, line and function info will also be printed (where available). Otherwise, only the module name will be printed. Parameters: error The error to print Returns: A string containing all printable errors. This string needs to be freed by the user of this function. char* globus_error_print_friendly (globus_object_t *error) Return a string containing error messages from the top 1 and bottom 3 objects, and, if found, show a friendly error message. The error chain will be searched from top to bottom until a friendly handler is found and a friendly message is created. If the GLOBUS_ERROR_VERBOSE env is set, then the result from globus_error_print_chain() will be used. Parameters: error The error to print Returns: A string containing a friendly error message. This string needs to be freed by the user of this function. Author Generated automatically by Doxygen for globus common from the source code. Version 14.7 Tue Nov 27 2012 Error Handling Helpers(3)
All times are GMT -4. The time now is 07:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy