07-01-2013
Hi,
Thanks for the response!
Advice taken.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a very basic bash shell script, which has many "while... done; for .... done" loop clauses, like the following
~~
#!/bin/bash
while blablalba; do
....
done < /tmp/file
for line in `cat blablabla`; do grep $line /tmp/raw ; done > /tmp/1;
while blablalba2; do
....
done <... (2 Replies)
Discussion started by: fedora
2 Replies
2. Shell Programming and Scripting
SEND_MESSAGE=test
echo $SEND_MESSAGE
if
then
echo `date` > update_dt_ccaps.lst
echo "The file transfer failed" >> update_dt_ccaps.lst
SEND_MESSAGE=false
fi
The above code is showing error in bash shell as :
./test: line 5: [: test: integer expression expected
... (2 Replies)
Discussion started by: DILEEP410
2 Replies
3. Shell Programming and Scripting
Hi all
Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Discussion started by: rethink
4 Replies
4. Shell Programming and Scripting
Hi,
I am working on bash script after a long time. I am getting error near done statement while running a for loop snippet. The error says "Syntax error near unexpcted token 'done'"
please suggest what could be wrong. here is the snippet
elements=${#option_arr} //an array of values... (1 Reply)
Discussion started by: arundhati_s
1 Replies
5. Shell Programming and Scripting
Having issues with an expect script. I've been scripting bash, python, etc... for a couple years now, but just started to try and use Expect. Trying to create a script that takes in some arguments, and then for now, just runs a pwd command(for testing, final will be command I pass).
Here is... (0 Replies)
Discussion started by: cbo0485
0 Replies
6. Shell Programming and Scripting
Hi, I have written a script that allows me to repetitively play a music file $N times, which is specified through user input. However, if I want to exit the script before it has finished looping $N times, if I use CTRL+c, I have to CTRL+c however many times are left in order to complete the loop.... (9 Replies)
Discussion started by: hilltop_yodeler
9 Replies
7. Shell Programming and Scripting
I have the following while loop that I put in a script, demo.sh:
while read rna; do
aawork=$(echo "${rna}" | sed -n -e 's/\(...\)\1 /gp' | sed -f rna.sed)
echo "$aawork" | sed 's/ //g'
echo "$aawork" | tr ' ' '\012' | sort | sed '/^$/d' | uniq -c | sed 's/*\(*\) \(.*\)/\2: \... (3 Replies)
Discussion started by: faizlo
3 Replies
8. Shell Programming and Scripting
Dear all,
Please help with the following.
I have a file, let's call it data.txt, that has 3 columns and approx 700,000 lines, and looks like this:
rs1234 A C
rs1236 T G
rs2345 G T
Please use code tags as required by forum rules!
I have a second file, called reference.txt,... (1 Reply)
Discussion started by: aberg
1 Replies
9. UNIX for Beginners Questions & Answers
Hi everyone
I need some help
I want to create an script which does some processing
it takes the two arguments 201901010000 and 201901020200 - so YYYMMDDHHMM
I want to split processing into hours from start until end,
I dont get why this works but when I add to a future variable... (1 Reply)
Discussion started by: kl1ngac1k
1 Replies
10. UNIX for Beginners Questions & Answers
Create a single bash script that does the following:
a. Print out the number of occurrences for each motif that is found in the bacterial genome and output to a file called motif_count.txt
b. Create a fasta file for each motif (so 3 in total) which contains all of the genes and their... (6 Replies)
Discussion started by: dre
6 Replies
LEARN ABOUT OPENSOLARIS
mms_get_attribute
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)