02-19-2020
As you have now valid solutions to your issue AND as we are not here to do the work for you its time to close this thread knowing that you are not following the new rules
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
I am trying to run a sql query from shell script as below but I get "Bind variable "1" not declared" error.
1.sh shell script has following:
sDb="abc/xyz@aaa"
a="1.sql"
sqlplus -s $sDb @$a $1
1.sql file has following:
spool Result.tmp append
select cust_name from orders... (1 Reply)
Discussion started by: ppat7046
1 Replies
2. Shell Programming and Scripting
Hi,
I have a script that transfers files from a Solaris server to target unix servers. The script uses Net::FTP->put to write the files, which can be any number of files, not always the same. This script works flawlessly to many servers.
For one particular instance of the script,... (3 Replies)
Discussion started by: csgonan
3 Replies
3. Shell Programming and Scripting
What I am doing is creating a top menu, which a user will select a choice with a number entry. That number corresponds to a string in an array. I then want to assign that response to another array I've already declared.
For example:
#!/bin/bash
colors=(red blue yellow)
red=(cherry fire)... (2 Replies)
Discussion started by: Akilleez
2 Replies
4. Shell Programming and Scripting
I have following expression:
echo "Sun 12 Jul BST 2014\nSun 12 Jul 2014\nSun 12 Jul IS 2014" | awk '/(Sun)+( 12)+( Jul )+({3} )?(2014)/{print;}'
I ran above code in AIX box and output is as follows
Sun 12 Jul BST 2014
Sun 12 Jul 2014
I ran above code in Linux box and output is as... (8 Replies)
Discussion started by: kamlesh_pradhan
8 Replies
5. Shell Programming and Scripting
Hi,
On linux i have the below command working fine.
grep -o '<name>.*</name>' deploy.tmp | sed 's/\(<name>\|<\/name>\)//g' deploy.tmp
But the same is failing on Solaris
uname -a
SunOS mymac 5.10 Generic_150400-23 sun4v sparc sun4v
Can you tell me how can i get it work on Solaris ?... (6 Replies)
Discussion started by: mohtashims
6 Replies
6. Shell Programming and Scripting
On linux i have the below command working fine.
awk '/<app-deploy>/{A=1;++i} /<\/app-deploy>/{print >> "found"i".tmp";A=0} A{;print >> "found"i".tmp"}' deploy.xml
But the same is failing on Solaris
Output:
awk: syntax error near line 1
awk: bailing out near line 1
uname -a SunOS mymac 5.10... (5 Replies)
Discussion started by: mohtashims
5 Replies
7. Shell Programming and Scripting
Hi,
On Linux i get the desired ouput:
echo "<value>WEB_USER</value>" | sed 's/\(<value>\|<\/value>\)//g'Output:
Executing the same command on Solaris:
echo "<value>WEB_USER</value>" | sed 's/\(<value>\|<\/value>\)//g'Output:
I need to get the desired output on Solaris i.e. WEB_USER and... (4 Replies)
Discussion started by: mohtashims
4 Replies
8. UNIX for Beginners Questions & Answers
Hi,
i am new here let me say HI for all.
now i have a question please:
i am sending one command to my machine to create 3 names.
if one of the names exists then the box return error message that already have the name but will continue to create the rests.
How i can break the command and... (7 Replies)
Discussion started by: Amiri
7 Replies
9. Shell Programming and Scripting
Hi,
I am looking for a generic find command that works on both Linux and Solaris.
I have the below command that works fine on Linux but fails on solaris.find /web/config -type f '(' -name '*.txt' -or -name '*.xml' -name '*.pro' ')' Fails on SunOS mysolaris 5.10 Generic_150400-61 sun4v sparc... (1 Reply)
Discussion started by: mohtashims
1 Replies
10. Shell Programming and Scripting
I wish to replace "\\n" with a single white space.
The below does the job on command-line:
$ echo '/fin/app/scripts\\n/fin/app/01/sql' | sed -e 's#\\\\n# #g';
/fin/app/scripts /fin/app/01/sql
However, when i have the same code to a shell script it is not able to get me the same output:... (8 Replies)
Discussion started by: mohtashims
8 Replies
LEARN ABOUT OSF1
thread_terminate
thread_terminate(9r) thread_terminate(9r)
NAME
thread_terminate - General: Prepares to stop or stops execution of the specified kernel thread
SYNOPSIS
kern_return_t thread_terminate(
thread_t thread_to_terminate );
ARGUMENTS
Specifies a pointer to the thread structure associated with the kernel thread that you want to terminate. This pointer was returned in a
previous call to the kernel_isrthread or kernel_thread_w_arg routine.
DESCRIPTION
The thread_terminate routine prepares to stop or permanently stops execution of the specified kernel thread. You created and started this
kernel thread in a previous call to the kernel_isrthread or kernel_thread_w_arg routine. These routines return a pointer to the thread
structure associated with the newly created and started kernel thread. Kernel modules use this pointer as a handle to identify the specific
kernel thread that thread_terminate stops executing.
Typically, a kernel thread terminates itself. However, one kernel thread can terminate another kernel thread. A kernel thread that termi-
nates itself must call thread_halt_self immediately after the call to thread_terminate. The reason for this is that thread_terminate only
prepares the self-terminating kernel thread to stop execution. The thread_halt_self routine completes the work needed to stop execution
(by performing the appropriate cleanup work) of the self-terminating kernel thread.
Specifically, the thread_terminate routine works as follows: For terminating other kernel threads
The thread_terminate routine stops execution of the specified kernel thread, frees any resources associated with that kernel thread,
and thus makes the kernel thread unavailable. To make the kernel thread available again, you need to create it by calling ker-
nel_isrthread or kernel_thread_w_arg. A kernel thread terminates itself
The thread_terminate routine prepares to stop execution of the kernel thread that needs to terminate itself. The thread_halt_self
routine completes the work needed to stop execution of the self-terminating kernel thread by performing the appropriate cleanup
work. After you call these routines, the self-terminating kernel thread becomes unavailable until you create it again by calling
kernel_isrthread or kernel_thread_w_arg.
NOTES
You do not need to terminate every kernel thread that you create. You should not terminate a kernel thread that is waiting for some event.
The basic rule is that you should terminate only those kernel threads that you do not need anymore. For example, if a dynamically config-
ured kernel module uses kernel threads, you should terminate them in the CFG_OP_UNCONFIGURE entry point of the loadable module's configure
routine. The kernel threads are no longer needed after the module is unconfigured.
Note that the thread_terminate routine (for kernel threads that terminate other kernel threads) not only permanently stops execution of the
specified kernel thread, but it also frees any resources associated with that kernel thread; thus, this kernel thread can no longer be
used.
RETURN VALUES
Upon successfully terminating the specified kernel thread, thread_terminate returns the constant KERN_SUCCESS. If the thread structure
pointer passed to the thread_to_terminate argument does not identify a valid kernel thread, thread_terminate returns the constant
KERN_INVALID_ARGUMENT. On any other error, thread_terminate returns the constant KERN_FAILURE.
SEE ALSO
Data Structures: thread(9s)
Routines: kernel_isrthread(9r), kernel_thread_w_arg(9r), thread_halt_self(9r)
thread_terminate(9r)