shell

Package: WA2L/edrc 1.5.57
Section: General Commands (1)
Updated: 08 January 2025
Index Return to Main Contents

 

NAME

shell - start the interactive shell

 

SYNOPSIS

edrc -> shell

edrc/bin/shell [ -h | host | user@host ]

 

AVAILABILITY

WA2L/edrc

 

DESCRIPTION

There are two variants of the shell command. The first one is the shell command started within edrc(1m), the second one is the edrc/bin/shell command line command.

 

EDRC command: edrc -> shell


start a shell in edrc. You should use this command to exit to the operating system rather than to do an other telnet, rlogin or ssh to the system.

The prompt is:


  [ /opt/edrc/scripts/ACME-sat/file:SystemFiles ]
  [ root@acme001 ][*edrc*/bash]:

When you use the shell command, the current working directory is the location in the menu you are currently in. Furthermore the shell settings are tuned and customized to the WA2L/edrc environment and all $EDRC_ environment variables are exported to the shell.
Call the edrcenv(1) command to display the official WA2L/edrc environment variables.

On UNIX the Korn-Shell (ksh), on Linux the Bourne-Again-Shell (bash) will be started. To see all additional commands and aliases you have available in the shell type usage within the started shell.

 

Command line command: edrc/bin/shell [ [user@]host ]


the shell command provides a slightly reduced environment as the shell command started within edrc, but you can profit from the environment and all commands available in WA2L/edrc without the need to start edrc(1m).

The prompt is:


  [ /data/ACME/apps ]
  [ root@acme001 ][*eshell*/bash]:

The differences to the shell start in edrc is, that the environment variables $EDRC_SESSION, $EDRC_SCRIPTS_BASEDIR, $EDRC_ENV, $EDRC_CONFIGFILE, $EDRC_RECOVERYTIME, $EDRC_NLS_DATE_FORMAT, $EDRC_NLS_LANG, $NLS_DATE_FORMAT and $NLS_LANG are not set.
Call the edrcenv(1) command to display the official WA2L/edrc environment variables.

When connecting to host the shell is started directly on the remote system if WA2L/edrc is installed. If WA2L/edrc is not installed a connection to the remote system without the shell enhancements is established.

 

COMMANDS

The following commands are only available when the shell is started (~built in commands / aliases). Those commands are intended to ease up the work when working interactively in the shell. Therefore this commands cannot be used within scripts. The commands described here are also listed in the usage(1) output, when usage is called within the shell.

handle working variables:
a [ something ]
set working variable $a with the current working directory or something
b [ something ]
set working variable $b with the current working directory or something
c [ something ]
set working variable $c with the current working directory or something
d [ something ]
set working variable $d with the current working directory or something
e [ something ]
set working variable $e with the current working directory or something
f [ something ]
set working variable $f with the current working directory or something
g [ something ]
set working variable $g with the current working directory or something
abc
print $a $b $c $d $e $f $g $p $TODAY
abc (a|b|c|d|e|f|g)
load $a $b $c $d $e $f $g from other edrc/bin/shell or edrc/bin/eshell session
abcd
print $a $b $c $d $e $f $g $p $TODAY
abcd (a|b|c|d|e|f|g)
load $a $b $c $d $e $f $g from other edrc/bin/shell or edrc/bin/eshell session

$PATH manipulation/querying:
addcwd
append current working directory to $PATH (export PATH=$PATH:`pwd`)
cwdadd
add current working directory to $PATH (export PATH=`pwd`:$PATH)
ap
add ADDITIONAL_SHELL_PATH as defined in shell.cfg to $PATH (export PATH=$PATH:$ADDITIONAL_SHELL_PATH)
path
print $PATH

change directories:
ret
jump back to previous working directory
cda [ subdir ]
cd $a/subdir
cdb [ subdir ]
cd $b/subdir
cdc [ subdir ]
cd $c/subdir
cdd [ subdir ]
cd $d/subdir
cde [ subdir ]
cd $e/subdir
cdf [ subdir ]
cd $f/subdir
cdg [ subdir ]
cd $g/subdir
cdp [ subdir ]
cd $p/subdir
cdbin
cd EDRC bin/
cdpbin
cd EDRC pbin/
cdbkp
cd EDRC BACKUP_DIR
cdbx [ subdir ]
cd to user's DropBox directory ( USER_DROPBOX_DIR=dir in etc/shell.cfg ).
cdcnt
cd EDRC contrib/edrc/
cddoc
cd EDRC doc/
cdetc
cd EDRC etc/
cdlib
cd EDRC lib/
cdlog
cd EDRC log/
cdman
cd EDRC man/all/
cdscr
cd EDRC scripts/
cdrel
cd EDRC doc/.man/ which is the "release control" folder.
cdsrc
cd EDRC src/
cdtmp
cd EDRC $EDRC_TMP_DIR. If the $EDRC_TMP_DIR is not set, cd to /tmp.
cdsw
cd EDRC software dir
cdvar
cd EDRC var/
cdwww
cd EDRC var/www/
cdrpt
cd EDRC var/www/report/rpt/
cmc
cd /etc/cmcluster/

debugging:
debug
toggle script debug $DEBUG between True and False
edrcdebug [ command... ]
toggle $EDRC_DEBUG[_ COMMAND] between True and False. It is possible to supply a space delimited list of commands.

session variables:
erase [ backspace ]
set tty erase character
term [ terminal ]
set/query $TERM
termsize
set $COLUMNS and $LINES based on the current terminal size.
tz [ timezone ]
set/query $TZ
sid ORACLE_SID
set $ORACLE_SID to ORACLE_SID
shd
show $DISPLAY
std host
set $DISPLAY to host:0

command history:
hist
print shell history
r hist_number | cmd
re-execute cmd from history
histlist
print a table of history files produced by shell when started outside of shell for the current user.

help and manual pages:
h [ cmd ]
alias for usage(1)
help [ cmd ]
alias for usage(1)
man [ manpage ]
alias for edrcman(1)
manpath
print $MANPATH

list files and directories:
lc [ options ]
ls -aCF
lg [ options ]
ls -lagF
ll [ options ]
ls -laF

edit and view files:
vi [ options ] [ file .. ]
start vi(1) with prior initialization of the $COLUMNS and $LINES environment variables.
vim [ options ] [ file .. ]
start vim(1) with prior initialization of the $COLUMNS and $LINES environment variables.
view [ options ] [ file .. ]
start view(1) with prior initialization of the $COLUMNS and $LINES environment variables.
lgrep pattern file...
grep logfiles (having timestamps). The lgrep command is an alias to the loggrep(1) command.
manvi [ manpage ]
edit a manual page distributed in WA2L/edrc with vi(1). When editing a man page, first a backup copy in .$TODAY/ is created in the related edrc/man/ subdirectory.

If no manpage is specified, the edrcintro man page is loaded into the editor.

The manual pages of the Perl modules bundled with WA2L/edrc cannot be edited with this command.

special commands:
exit
exit the shell
ini app
init environment for application app
lscolors
toggle ls colors between True (= list files in color) and False (= do not list files in color).
grepcolors
toggle (e)grep colors between True (= colorize results) and False (= do not colorize results).
pid
select processes from the process command part of the process list. This is a convenience command to the pslist(1) command.

 

OPTIONS

Only command line variant.

-h
usage message.

host
system to connect to using SSH.

user@host
using user on system to connect to.

 

ENVIRONMENT

For an explanation of all environment variables listed with edrcenv(1) see section ENVIRONMENT in edrc(1m).

 

EXIT STATUS

0
no error.

1
shell is already started.

2
cannot find posix shell.

4
usage listed (only command line variant).

5
cannot connect to host.

 

FILES

etc/kshrc
main configuration file of shell. Do not edit this file, it might be patched on updates.

etc/shell.cfg
user configuration file of shell. This file can be adjusted.

 

EXAMPLES

-

 

SEE ALSO

edrcintro(1), edrc(1m), bash(1), ksh(1), perl_modules(3), shell.cfg(4)

 

NOTES

This shell is not a programming shell, the only intention is to use it interactively.

 

BUGS

-

 

AUTHOR

shell was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2025 Christian Walther

This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
EDRC command: edrc -> shell
Command line command: edrc/bin/shell [ [user@]host ]
COMMANDS
OPTIONS
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 10:53:57 GMT, January 08, 2025