How can I add to the current oraenv.sh so that is an oracle_sid is passed then it won't prompt for the vaid sid and just take it. If it is not passed then do what it is doing right now ??
if # Command executed from a terminal
then
ORACLE_SID=""
... (1 Reply)
How do i run a shell script or perl script with in the context of a current shell.
I know that i can use command source. but we can't pass any arguments to
our script if we use source command as it takes only one argement i.e filename
Is there any way to run a script in the current shell... (5 Replies)
Hello all,
I'm new to shell programming and need some help. I would like to set up a step within a shell script to trigger another shell script to run, based on the highest return code generated in the current script. For example, if the highes return code value in the current script is less... (1 Reply)
Hi,
Using AIX 5.3 and Ksh.
/>ls -al /usr/bin/ksh
-r-xr-xr-x 5 bin bin 237420 Apr 10 2007 /usr/bin/ksh
/>
I recently started working for a new employer. I have written UNIX K-Shell scripts for many years and have never had this particular issue before. Its perplexing me.
I have... (2 Replies)
This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord
but only one record is getting wrote in DB.... Please advise ASAP...:confused:
function InsertFtg
{
FTGSTR=""
echo "Saurabh is GREAT $#"
let... (2 Replies)
Hi everyone,
Is there a slick way to determine the FULL name of a script that is running?
The variable ${0} just gives the relative path name.
I guess I could just do the following:
FULL_SCRIPT_NAME=${PWD}${0}Although that's pretty simple is there another way that I am missing?
... (4 Replies)
Hi,
i have a script a.sh that calls b.sh
Both take parameters
a.sh
{
b.sh p1 p2 p3
}
b.sh
{
GIVEN_CMD="`basename $0` $@"
echo "${GIVEN_CMD}
}
Now when i run:
a.sh q1 q2
It prints only
a.sh q1 q2
Inside b.sh, how can i print both the script names and their parameters passed? (6 Replies)
Hi
I have been using sed -n -e '/regex/{N;p;}' to print the matching line and the next line.
In cases where I have a matching line at the end of the document with no next line, that line is skipped. How do I print that line as well?
Thanks. (10 Replies)
Hi,
I've come accross a situation where I need to exit from current shell script at the same time I need to start/activate another shell script.
How can I do that in KSH ?? Need help !!
For example, my script is as below
#!/bin/ksh
paramFile="/home/someXfile.lst"
] && <<Here I... (1 Reply)
Dear All.
I have a script, which process files one by one. In the script I have two functions.
one sftp files to different server
the other from existing file create file with different name.
My question is:
Will sftp function recognize files names , which are created in another... (1 Reply)
Discussion started by: digioleg54
1 Replies
LEARN ABOUT FREEBSD
service
SERVICE(8) BSD System Manager's Manual SERVICE(8)NAME
service -- control (start/stop/etc.) or list system services
SYNOPSIS
service -e
service -R
service [-v] -l | -r
service [-v] <rc.d script> start|stop|etc.
DESCRIPTION
The service command is an easy interface to the rc.d system. Its primary purpose is to start and stop services provided by the rc.d scripts.
When used for this purpose it will set the same restricted environment that is in use at boot time (see below). It can also be used to list
the scripts using various criteria.
The options are as follows:
-e List services that are enabled. The list of scripts to check is compiled using rcorder(8) the same way that it is done in rc(8), then
that list of scripts is checked for an "rcvar" assignment. If present the script is checked to see if it is enabled.
-R Restart all enabled local services.
-l List all files in /etc/rc.d and the local startup directories. As described in rc.conf(5) this is usually /usr/local/etc/rc.d. All
files will be listed whether they are an actual rc.d script or not.
-r Generate the rcorder(8) as in -e above, but list all of the files, not just what is enabled.
-v Be slightly more verbose
ENVIRONMENT
When used to run rc.d scripts the service command sets HOME to / and PATH to /sbin:/bin:/usr/sbin:/usr/bin which is how they are set in
/etc/rc at boot time.
EXIT STATUS
The service utility exits 0 on success, and >0 if an error occurs.
EXAMPLES
The following are examples of typical usage of the service command:
service named status
service -rv
The following programmable completion entry can be use in bash(1) for the names of the rc.d scripts:
_service () {
local cur
cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) )
return 0
}
complete -F _service service
SEE ALSO bash(1) (ports/shells/bash), rc.conf(5), rc(8), rcorder(8)HISTORY
The service utility first appeared in FreeBSD 7.3.
AUTHORS
This manual page was written by Douglas Barton <dougb@FreeBSD.org>.
BSD December 11, 2012 BSD