05-28-2008
Ctrl d does the same as exit what could be easier?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi to everyone.
How can I get the exit status from a remote command executed with rexec? :eek:
machine A has RedHat Linux 9 and the remote machine B has SCO UNIX.
Code:
rexec -l user -p password host sh /u/files/scripts/seq_cal.sh 2006 08
I want the exit status returned by... (1 Reply)
Discussion started by: zoonalex
1 Replies
2. UNIX for Advanced & Expert Users
Hi,
How can I call my shell script, when I execute 'exit' command?
For eg. I am logging out the root login by 'exit' command. My script 'colinfo' shold execute before logging out. I don't want to use any wrapper script. (2 Replies)
Discussion started by: sharif
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am running following command: top -p <psid> | grep used
I want to send o/p of above command to some txt file but it do not break as it keeps going. How can I exit 'top -p <psid> | grep used' after certain time like 1 min or 2 mins? (1 Reply)
Discussion started by: sach253
1 Replies
4. Shell Programming and Scripting
What is the command to exit xwindow when i am in xwindow's terminal.
Thanks in advance. (3 Replies)
Discussion started by: uativan
3 Replies
5. Shell Programming and Scripting
Hi All,
I want to use EXIT command in a particular scenario.
In my script,its like that:-
if($vairable -eq 1);then
do this thing
do this
do this
fi
if($var2 -eq 1);then
do this
do this
fi
like this there are three four if conditions.
now I want is that if second condition is... (2 Replies)
Discussion started by: aruncser
2 Replies
6. UNIX for Dummies Questions & Answers
Problem with exit command
-----------------------------------------------------------------------
Hi,
I am executing script written by other user.
I am executing script A.ksh, and A.ksh calls B.ksh.
But It is giving error:
/home/user/B.ksh: exit: -1: unknown option
When I checked... (3 Replies)
Discussion started by: shreyas
3 Replies
7. UNIX for Advanced & Expert Users
Hi,
Want to log the output of command & check the exit status to find whether it succeeded or failed.
> ls abc
ls: abc: No such file or directory
> echo $?
1
> ls abc 2>&1 | tee log
ls: abc: No such file or directory
> echo $?
0
Tee commands changes my exit status to be always... (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies
8. Solaris
Hi everyone,
This is my first post in the forum. :-)
I was asked this question for an interview recently.
Q: What will happen if the .profile file has only the exit command in it and nothing else.
(Assume that every other settings are in place to run the .profile file, when the user... (6 Replies)
Discussion started by: avinashpv
6 Replies
9. Shell Programming and Scripting
Hi All,
I am doing an export and import (datapump) of 4 schema. I know we can do an export of 4 schema in one command. But just want to know how to check the exit status if i do the export/import of 4 schema in different commands in background. Please suggest.
Thanks,
Mani (1 Reply)
Discussion started by: pvmanikandan
1 Replies
10. Shell Programming and Scripting
so i'm running remote scripts using the nc command and it's working great.
from the monitoring server, i run this from the command line:
echo "external_cmd check_mem.sh 10% 15% pipo pi=40,50 po=40,55" | nc -w 35 remotehost 5666
which results in the following when everything is fine:... (3 Replies)
Discussion started by: SkySmart
3 Replies
vmsish(3pm) Perl Programmers Reference Guide vmsish(3pm)
NAME
vmsish - Perl pragma to control VMS-specific language features
SYNOPSIS
use vmsish;
use vmsish 'status'; # or '$?'
use vmsish 'exit';
use vmsish 'time';
use vmsish 'hushed';
no vmsish 'hushed';
vmsish::hushed($hush);
use vmsish;
no vmsish 'time';
DESCRIPTION
If no import list is supplied, all possible VMS-specific features are assumed. Currently, there are four VMS-specific features available:
'status' (a.k.a '$?'), 'exit', 'time' and 'hushed'.
If you're not running VMS, this module does nothing.
"vmsish status"
This makes $? and "system" return the native VMS exit status instead of emulating the POSIX exit status.
"vmsish exit"
This makes "exit 1" produce a successful exit (with status SS$_NORMAL), instead of emulating UNIX exit(), which considers "exit 1" to
indicate an error. As with the CRTL's exit() function, "exit 0" is also mapped to an exit status of SS$_NORMAL, and any other
argument to exit() is used directly as Perl's exit status.
"vmsish time"
This makes all times relative to the local time zone, instead of the default of Universal Time (a.k.a Greenwich Mean Time, or GMT).
"vmsish hushed"
This suppresses printing of VMS status messages to SYS$OUTPUT and SYS$ERROR if Perl terminates with an error status, and allows
programs that are expecting "unix-style" Perl to avoid having to parse VMS error messages. It does not suppress any messages from
Perl itself, just the messages generated by DCL after Perl exits. The DCL symbol $STATUS will still have the termination status, but
with a high-order bit set:
EXAMPLE:
$ perl -e"exit 44;" Non-hushed error exit
%SYSTEM-F-ABORT, abort DCL message
$ show sym $STATUS
$STATUS == "%X0000002C"
$ perl -e"use vmsish qw(hushed); exit 44;" Hushed error exit
$ show sym $STATUS
$STATUS == "%X1000002C"
The 'hushed' flag has a global scope during compilation: the exit() or die() commands that are compiled after 'vmsish hushed' will be
hushed when they are executed. Doing a "no vmsish 'hushed'" turns off the hushed flag.
The status of the hushed flag also affects output of VMS error messages from compilation errors. Again, you still get the Perl
error message (and the code in $STATUS)
EXAMPLE:
use vmsish 'hushed'; # turn on hushed flag
use Carp; # Carp compiled hushed
exit 44; # will be hushed
croak('I die'); # will be hushed
no vmsish 'hushed'; # turn off hushed flag
exit 44; # will not be hushed
croak('I die2'): # WILL be hushed, croak was compiled hushed
You can also control the 'hushed' flag at run-time, using the built-in routine vmsish::hushed(). Without argument, it returns the
hushed status. Since vmsish::hushed is built-in, you do not need to "use vmsish" to call it.
EXAMPLE:
if ($quiet_exit) {
vmsish::hushed(1);
}
print "Sssshhhh...I'm hushed...
" if vmsish::hushed();
exit 44;
Note that an exit() or die() that is compiled 'hushed' because of "use vmsish" is not un-hushed by calling vmsish::hushed(0) at
runtime.
The messages from error exits from inside the Perl core are generally more serious, and are not suppressed.
See "Perl Modules" in perlmod.
perl v5.16.2 2012-10-11 vmsish(3pm)