05-28-2008
exit command
Hi All,
Having just started using Unix after a long time on VMS, I end up having multiple Unix and VMS sessions open. Is there a way I can set up a symbol or something so that "lo" means "exit" and exits my session ?
On VMS, if I wanted to do the opposite of this I would do it like this :
exit :== lo
Then typing exit would issue the command lo (logout)
Thanks
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
LEARN ABOUT OSX
file::spec::vms
File::Spec::VMS(3pm) Perl Programmers Reference Guide File::Spec::VMS(3pm)
NAME
File::Spec::VMS - methods for VMS file specs
SYNOPSIS
require File::Spec::VMS; # Done internally by File::Spec if needed
DESCRIPTION
See File::Spec::Unix for a documentation of the methods provided there. This package overrides the implementation of these methods, not the
semantics.
The default behavior is to allow either VMS or Unix syntax on input and to return VMS syntax on output unless Unix syntax has been
explicity requested via the "DECC$FILENAME_UNIX_REPORT" CRTL feature.
canonpath (override)
Removes redundant portions of file specifications and returns results in native syntax unless Unix filename reporting has been enabled.
catdir (override)
Concatenates a list of file specifications, and returns the result as a native directory specification unless the Unix filename
reporting feature has been enabled. No check is made for "impossible" cases (e.g. elements other than the first being absolute
filespecs).
catfile (override)
Concatenates a list of directory specifications with a filename specification to build a path.
curdir (override)
Returns a string representation of the current directory: '[]' or '.'
devnull (override)
Returns a string representation of the null device: '_NLA0:' or '/dev/null'
rootdir (override)
Returns a string representation of the root directory: 'SYS$DISK:[000000]' or '/'
tmpdir (override)
Returns a string representation of the first writable directory from the following list or '' if none are writable:
/tmp if C<DECC$FILENAME_UNIX_REPORT> is enabled.
sys$scratch:
$ENV{TMPDIR}
Since perl 5.8.0, if running under taint mode, and if $ENV{TMPDIR} is tainted, it is not used.
updir (override)
Returns a string representation of the parent directory: '[-]' or '..'
case_tolerant (override)
VMS file specification syntax is case-tolerant.
path (override)
Translate logical name DCL$PATH as a searchlist, rather than trying to "split" string value of $ENV{'PATH'}.
file_name_is_absolute (override)
Checks for VMS directory spec as well as Unix separators.
splitpath (override)
($volume,$directories,$file) = File::Spec->splitpath( $path );
($volume,$directories,$file) = File::Spec->splitpath( $path,
$no_file );
Passing a true value for $no_file indicates that the path being split only contains directory components, even on systems where you can
usually (when not supporting a foreign syntax) tell the difference between directories and files at a glance.
splitdir (override)
Split a directory specification into the components.
catpath (override)
Construct a complete filespec.
abs2rel (override)
Attempt to convert an absolute file specification to a relative specification.
rel2abs (override)
Return an absolute file specification from a relative one.
COPYRIGHT
Copyright (c) 2004 by the Perl 5 Porters. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
See File::Spec and File::Spec::Unix. This package overrides the implementation of these methods, not the semantics.
An explanation of VMS file specs can be found at <http://h71000.www7.hp.com/doc/731FINAL/4506/4506pro_014.html#apps_locating_naming_files>.
perl v5.16.2 2012-10-11 File::Spec::VMS(3pm)