05-29-2014
Is this a homework assignment?
Moderator's Comments:
|
|
(Note: Aia's response has been hidden until we get a response to this question.)
|
|
If not, please explain why you need to do this.
Last edited by Don Cragun; 05-29-2014 at 10:12 PM..
Reason: Add note about hidden response.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a control file which tells me which are the fields in the files I need to compare and based on the values I need to print the exact value if key =Y and output is Y , or if output is Y/N then I need to print only Y if it matches or N if it does not match and if output =N , then skip the feild... (7 Replies)
Discussion started by: newtoawk
7 Replies
2. Shell Programming and Scripting
Problem :
I want to create a separate file for country list if condition is true. Please help.
*****************************************************
Input file:
SV-INCR-139302-365540488-201104090934.sqllog
SV-INCR-1082-552793184-201104040805.sqllog
SV-INCR-1077-855045741-201104040805.sqllog... (4 Replies)
Discussion started by: humaemo
4 Replies
3. Shell Programming and Scripting
Hi,
Input
7488 7389 chr1.fa chr1.fa
3546 9887 chr5.fa chr9.fa
7387 7898 chrX.fa chr3.fa
7488 7389 chr21.fa chr3.fa
7488 7389 chr1.fa chr1.fa
3546 9887 chr9.fa chr5.fa
7898 7387 chrX.fa chr3.fa
Desired Output
7488 7389 chr1.fa chr1.fa 2
3546 9887 chr5.fa chr9.fa 2... (2 Replies)
Discussion started by: jacobs.smith
2 Replies
4. Shell Programming and Scripting
Hi,
I would like to sort a list in different ways:
1> Unique based on Field 1 with highest Field 4
For Instance Input:
1678923450;11112222333344;11-1x;2_File.xml
1678923450;11112222333344;11-1x;5_File.xml
1234567890;11113333222244;11-1x;3_File.xml
Output:
... (7 Replies)
Discussion started by: DevendraG
7 Replies
5. Shell Programming and Scripting
Dear All,
I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File.
The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files.
Any... (14 Replies)
Discussion started by: Rahul_Bhasin
14 Replies
6. Shell Programming and Scripting
Hi , I want to compare first 3 columns of File A and File B and create a new file File C which will have all rows from File B and will include rows that are present in File A and not in File B based on First 3 column comparison.
Thanks in advance for your help.
File A
A,B,C,45,46... (2 Replies)
Discussion started by: ady_koolz
2 Replies
7. Shell Programming and Scripting
Hi Good morning all,
I want to create script file with multiple commands.
For ex:
pmrep connect is one of the command to connect to repository.
pmrep objectexport is another command to export objects to a file.
These commands should run sequentially.But when i try to execute this, the first... (4 Replies)
Discussion started by: SekhaReddy
4 Replies
8. Shell Programming and Scripting
HI All,
I'm embedding SQL query in Script which gives following output:
Assignee Group Total
ABC Group1 17
PQR Group2 5
PQR Group3 6
XYZ Group1 10
XYZ Group3 5
I have saved the above output in a file.
How do i sum up the contents of this output so as to get following output:
... (4 Replies)
Discussion started by: Khushbu
4 Replies
9. UNIX for Beginners Questions & Answers
OS: window 7
shell : korn shell
I have 2 file , i'm need grep data according File_1 from file 2.
File_1
CAL_ENAB_N_4_
$2N12743_29
+12V
File_2
NODE CAL_ENAB_N_4_
PINS
21548;
PROBES
P1465 3651, 46900 tn2700.1 LWT;
WIRES (6 Replies)
Discussion started by: kttan
6 Replies
10. UNIX for Beginners Questions & Answers
I have requirement to split below file (sample.csv) into multiple files by using the unique columns (first 3 are unique columns)
sample.csv
123|22|56789|ABCDEF|12AB34|2019-07-10|2019-07-10|443.3400|1|1
123|12|5679|BCDEFG|34CD56|2019-07-10|2019-07-10|896.7200|1|2... (3 Replies)
Discussion started by: RVSP
3 Replies
LEARN ABOUT OPENSOLARIS
mms_handle_err_rsp
mms_rsp_type(3MMS) Media Management System Library Functions mms_rsp_type(3MMS)
NAME
mms_rsp_type, mms_get_tree, mms_get_str, mms_get_attribute, mms_handle_err_rsp - MMS client functions for handling responses
SYNOPSIS
cc [ flag...] file... -lmms [ library...]
#include <mms_api.h>
int mms_rsp_type(void *response);
mms_par_node_t *mms_get_tree(void *response);
char *mms_get_str(void *response);
char *mms_get_attribute(void *response, char *name, void **prev);
int mms_handle_err_response(void *response, int * class, int * code,
char **message);
DESCRIPTION
For these functions, response is the MMS response to an MMP command sent by the client.
The mms_rsp_type() macro returns the type of the response. The following is a list of responses:
MMS_API_RSP_UNACC unacceptable response
MMS_API_RSP_FINAL success response
MMS_API_RSP_FINAL_INTR intermediate response
MMS_API_RSP_FINAL_ERR error response
MMS_API_RSP_FINAL_CANC cancelled response
The mms_get_tree() macro returns the parse tree of the response.
The mms_get_str() macro returns the response string.
The mms_get_attribute() function takes a response with name values looking for name, and returning the value associated with it. A client
can call this function multiple times if the response contains multiple instances of name. When all occurrences of name have been found,
NULL is returned.
The mms_handle_err_rsp() function processes an error response on behalf of the client. It returns the error class, error code, and the
internationalized error message if one was included.
RETURN VALUES
Upon successful completion, mms_handle_err_rsp() returns MMS_API_OK. If it encounters a processing error, it returns an error code indicat-
ing the type of error.
ERRORS
These functions will fail if:
MMS_API_ERROR Unable to obtain error class or code.
MMS_API_NOT_ERR_RSP Response is not an error response.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Uncommitted |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
libmms(3LIB), mms_init(3MMS), mms_send_cmd(3MMS), attributes(5)
SunOS 5.11 28 Oct 2008 mms_rsp_type(3MMS)