09-10-2011
Thanks Ahamed
But i want the output of $cmd to be printed on both console and to log-file together!
I wonder if this make sense: having a command that that can take PID as input and give us the exit status if it has already exited and throw an error if it has not yet exited!!
of course i'm not sure how easy or difficult this is...
why do we have to always query the status immediately after it has exited?!!
problem not solved yet!!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i downloaded a text file from metalab.unc.edu called sh.txt and in this reference manual it refers to shell scripting exit status .. at the end of one of the examples that author gave an exit status of 127..
to what does a 127 exit status refer too and what is its purpose in the code.
moxxx68 (1 Reply)
Discussion started by: moxxx68
1 Replies
2. Shell Programming and Scripting
I'm trying to write a script that will update a table in sysbase.
If it's failed then I want to rerun it one more time before exiting the script (fail due to bad value such as trying to put a string into datetime field or bad connection to the database)
Well my code below will always return... (2 Replies)
Discussion started by: sirrtuan
2 Replies
3. Shell Programming and Scripting
Hi all,
I'm running a program which return 1 upon success.
But when encounters problem shell return 's '1' .
How to differentiate between them the shell return value and script return value.
Ex. function fn return '1' if executed successfully and '0' if failed. But when if shell encounters... (1 Reply)
Discussion started by: yhacks
1 Replies
4. Shell Programming and Scripting
I'm preparing for exam and one of exams is to write own test command...
I wonder if in unix is a command which just returns exit code you specify..
I know I can easily write a function like this:
exStatus() {
return $1
}
-> my question is rather theoretical
thank you! (9 Replies)
Discussion started by: MartyIX
9 Replies
5. Shell Programming and Scripting
I am trying to get the exit status of grep and test a condition with it, But it does not seem to be working as expected since i am doing something wrong apparently
as per grep help
Exit status is 0 if match, 1 if no match,
and 2 if trouble.
My problem is something like this
templine - a... (7 Replies)
Discussion started by: prasbala
7 Replies
6. Shell Programming and Scripting
Hi,
I'm having this simple code below, the file serverlist has a list of IPs one per line. When executed the while loop is executed only once, after that the program terminates. How should i redirect the exit status, so that the entire list of IP will get executed?
#!/bin/bash
exec <... (4 Replies)
Discussion started by: agent001
4 Replies
7. Shell Programming and Scripting
Lois_Answer_Code=`sipsak -vv -s sip:192.168.1.3|grep -A 1 "reply received after"|grep SIP|awk '{print $2}'`How to find the exit status of | (12 Replies)
Discussion started by: proactiveaditya
12 Replies
8. Shell Programming and Scripting
I have a shell script (#!/bin/sh) that interacts with Appworx and Banner Admin. In my script I want to check the exit status of awrun before continuing. awrun can run for 10 seconds or it can run for over a minute. So my question is, will it go through my if statement before awrun may even be... (2 Replies)
Discussion started by: smkremer
2 Replies
9. Shell Programming and Scripting
Hi All,
I have a peculiar requirement as follows,
I have a some hosts on which i have to run a script, so i am using the following code piece
for i in $HOSTLIST
do
ssh ${i} "~/task.sh"
done
Now i want to run this same thing in parallel on all the hosts and then monitor the ssh process... (1 Reply)
Discussion started by: mihirvora16
1 Replies
10. Shell Programming and Scripting
Hi All,
I am trying to create a zip file with all the txt files(these are in large number) in the current directory. I am able to do this operation sucessfully.
After this i want to get the status of the tar command executed and do accordingly. When i am trying with the below code, the status... (3 Replies)
Discussion started by: paddu
3 Replies
LEARN ABOUT OPENSOLARIS
smbd
smbd(1M) System Administration Commands smbd(1M)
NAME
smbd - CIFS server daemon
SYNOPSIS
/usr/lib/smbsrv/smbd
DESCRIPTION
The smbd daemon handles CIFS/SMB requests from CIFS clients, such as Windows clients. Only processes with {PRIV_SYS_SMB} and sufficient
privileges to write the /var/run directory can run this daemon.
The smbd daemon is automatically invoked by using the sharemgr command over all available transports. By default, smbd starts over the Net-
BIOS-Over-TCP (NBT) and TCP transports.
When smbd is started over NBT, the following services are started:
o The NetBIOS name service is started on UDP port 137.
o The NetBIOS datagram service is started on UDP port 138.
o The NetBIOS session service is started on TCP port 139.
When the smbd daemon is started over TCP, the CIFS service is started on TCP port 445.
Only one instance of smbd may be running at a time.
EXIT STATUS
The following exit values are returned:
0 Daemon exited cleanly.
95 Daemon exited with a fatal error.
96 Daemon exited with a configuration error.
ATTRIBUTES
See the attributes(5) man page for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWsmbsu |
+-----------------------------+-----------------------------+
|Interface Stability |Uncommitted |
+-----------------------------+-----------------------------+
SEE ALSO
ps(1), svcs(1), sharectl(1M), sharemgr(1M), smbadm(1M), smbstat(1M), svcadm(1M), smb(4), smbautohome(4), system(4), attributes(5), smf(5)
NOTES
Use the svcadm command to perform administrative actions on the smbd service, such as enabling, disabling, or restarting the service. Use
the svcs command to query the service status.
The smbd service is managed by the service management facility under the service identifier svc:/network/smb/server.
If the smbd service is disabled, it will be enabled by the sharemgr(1M) command, unless its auto_enable property is set to false.
SunOS 5.11 5 Feb 2008 smbd(1M)