11-29-2014
Thank worked perfectly! Thank you for the informative info as well, much appreciated!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am writing a ksh script which will use sqlplus to run a sql and pass 2 variables as the SQL request. In the ksh script, I have 2 variables which are $min_snap and $max_snap holding 2 different numbers.
Inside the same script, I am using SQLPLUS to run an Oracle SQL script,... (6 Replies)
Discussion started by: rwunwla
6 Replies
2. Shell Programming and Scripting
Hi,
sample file looks like this..
<hp>
<name>
<detail>adsg</detail>
...
...
</name><ft>4264</ft>
</hp>
I need to edit the last but one line. I want the format to be ..
<hp>
<name>
<detail>adsg</detail>
...
...
</name> (3 Replies)
Discussion started by: meghana
3 Replies
3. Shell Programming and Scripting
I'm trying to store the response from a nawk command inside of a ksh script. The command is:
text=$(nawk -F: '$1 ~ /${imgArray}/ {print $2}' ${etcDir}/captions.txt)
From what I can tell, the imgArray variable is not being expanding when it is inside the single quote ('). Is there something I... (4 Replies)
Discussion started by: meman1188
4 Replies
4. Shell Programming and Scripting
I have a script that "runs" a script. For example:
./runscript.ksh pcnmc01.ksh
runscript puts pcnmc01.ksh into the background with log output going to the logfile.
After executing the command, I get this output:
Running script in the background: pcnmc01.ksh
Logfile:... (2 Replies)
Discussion started by: Eben Yong
2 Replies
5. Shell Programming and Scripting
I need to pass a DDL statement into a ksh script & parse the statement.
What is the best way to pass a DDL statement into a KSH script.
---------- Post updated at 09:28 AM ---------- Previous update was at 07:35 AM ----------
if the name of the script is test.ksh
test.ksh "ALTER TABLE... (12 Replies)
Discussion started by: gayathree
12 Replies
6. Red Hat
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Discussion started by: cielle
6 Replies
7. Shell Programming and Scripting
I was wondering if it is possible to execute a script that will remove a certain search pattern from a file and save it?
Manually I would just hit escape to enter command mode then search and delete the pattern "./srv 135.0.0.1.11111 210;=1" then save & exit the file
vi command to search and... (3 Replies)
Discussion started by: seekryts15
3 Replies
8. UNIX for Advanced & Expert Users
i wrote script for if file exists script do file edit problem with the script get stuck not existing as for exit i mentioned exit 0 , and how to give the exception for script it should add
./script -- add hi
./script --add "hi how are you"
now below script with case it is working for... (0 Replies)
Discussion started by: markjohn1
0 Replies
9. Shell Programming and Scripting
I want to make a config file which contain all the paths.
i want to read the config file line by line and pass as an argument on my below function.
Replace all the path with reading config path line by line and pass in respective functions.
how can i achieve that?
Kindly guide.
... (6 Replies)
Discussion started by: sadique.manzar
6 Replies
10. Shell Programming and Scripting
I'm able to read & print an array in varaible called "filelist"
I need to pass this array variable to a function called verify() and then read and loop through the passed array inside the function.
Unfortunately it does not print the entire array from inside the funstion's loop.
#/bin/ksh... (5 Replies)
Discussion started by: mohtashims
5 Replies
ctwatch(1) User Commands ctwatch(1)
NAME
ctwatch - watch events in a contract or group of contracts
SYNOPSIS
/usr/bin/ctwatch [-f] [-r] [-v] contract-type... | contract-id...
DESCRIPTION
The ctwatch utility allows a user to observe the events occurring within a set of contracts or contract types. By default, ctwatch watches
all contracts.
OPTIONS
The following options are supported:
-f Report events starting at the front of the event queue. Normally, ctwatch reports only events which occur after it has been
invoked. With the -f option, any events that still exist in the contracts' event queues when ctwatch is invoked (for example,
unacknowledged critical events) are also reported.
-r Reliably watches all messages. Normally, the system may drop informative events and acknowledged critical events at any time, so
ctwatch isn't guaranteed to see them all. This option may only be used if the ctwatch is invoked with the {PRIV_CONTRACT_EVENT}
privilege asserted in its effective set.
-v Request verbose event descriptions.
OPERANDS
The following operands are supported:
contract-type Valid contract types are:
process Process contracts.
contract-id A valid contract id.
OUTPUT
The following list defines the column headings and the meanings of a ctwatch report:
CTID The contract ID generating the event.
EVID The event ID.
CRIT Whether the event is informative, critical, or initiates an exit negotiation. Values are info, crit, or neg, respectively.
ACK The event has been acknowledged. Values are yes or "no".
CTTYPE The contract type.
SUMMARY A type-specific summary of the event.
EXAMPLES
Example 1: Watching a process contract
example% ctwatch -r 1
CTID EVID CRIT ACK CTTYPE SUMMARY
1 2 crit no process pid 100569 was created
1 3 info no process pid 100569 encountered hardware error
1 4 info no process pid 100568 exited
1 5 info no process pid 100569 exited
1 6 crit no process contract empty
EXIT STATUS
The following exit values are returned:
0 Successful completion.
1 An error occurred.
2 Invalid arguments.
FILES
/system/contract/*
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |See below. |
+-----------------------------+-----------------------------+
Human Readable Output is Unstable. Invocation is Evolving.
SEE ALSO
ctrun(1), ctstat(1), contract(4), process(4), attributes(5), privileges(5)
NOTES
Ordering of events is only guaranteed within a single contract, or within a single type when a type is specified.
ctwatch can only observe those events which are generated by contracts owned or authored by processes with the same effective user ID as
ctwatch, unless the {PRIV_CONTRACT_OBSERVER} privilege is asserted in its effective set.
SunOS 5.10 14 Jul 2004 ctwatch(1)