Hi,
i have a script which need to do behave differently when run as a startup process from init.d/ rc2.d script and when run manually from shell.
How do i distinguish whether my script is run by init process or by shell??
Will the command
/proc/$$/psinfo | grep "myscript" work well???... (2 Replies)
Storage_Unit=`du -h /var/spool/cron/root|awk '{print $1}'|sed -e "s/^.*\(.\)$/\1/"`
If
then
Size=`du -h /var/spool/cron/root|awk '{print $1}'|sed 's/.\{1\}$//'`
for Size_rounded_number in $(printf %.0f $Size); do
ROUNDED_Size=$Size_rounded_number
done
if #setting a threshold of say... (1 Reply)
Hi,
We are moving from linux to AIX servers, and as a result testing our scripts on the new platform. When I run one of our scripts, I get the following error message:
./branchDataUpdate.sh: syntax error at line 21 : `(' unexpected
Following is an extract from the script:
......
........ (1 Reply)
Hi All,
Is there any way where we can run few commands with different shell in a shell script ?
Let's have an example below,
My first line in script reads below,
#!/bin/sh
However due to some limitation of "/bin/sh" shell I wanted to use "/bin/bash" while executing few... (9 Replies)
Hi Experts,
I have a shell script which used to take oracle database backup, which is scheduled in a tidal scheduling tool. however it is throwing an error while triggering the job and getting below error in the log file.
"Launcher Error: This is an internal function"
shell script is... (1 Reply)
I am using following code to connect to oracle database from solaris shell script. which will try thrice to connect the database ...at the 4rth atempt it will exir=t.
count=0
while ; do
sqlplus -s $usrname/$password@dbSID <<-EOF | tee $logfile
WHENEVER OSERROR EXIT 9;
WHENEVER SQLERROR... (4 Replies)
Hi
We use "tcsh" shell . We do the following steps manually:
> exec ssh-agent zsh
> python "heloo.py" (in the zsh shell)
I am trying to do the steps above from a shell script
This is what I have so far
echo "Executing "
exec ssh-agent zsh
python "hello.py"
exit 0
Problem is... (5 Replies)
Dear All,
I have script.
Dest=""
IFS='
'
for translation in $(echo $MY_MAP)
do
t1=$(echo $translation | cut -d"=" -f1)
t2=$(echo $translation | cut -d"=" -f2| cut -d"," -f1)
if
then
Dest=$UNX/$u_product_path/$u_study_path/$UNXTR/$t2
break;
... (4 Replies)
Hi All,
I am running the below proc in unix by connecting through sqlplus and the procedure is completing successfully. But when i am trying to run through shell scripting by using function. I am getting the error as follows. Please guide me where I am going wrong.
#!/bin/sh
opera ()
{... (6 Replies)
Discussion started by: bhas85
6 Replies
LEARN ABOUT HPUX
rcancel
rcancel(1M)rcancel(1M)NAME
rcancel - remove requests from a remote printer spooling queue
SYNOPSIS
[id ...] [printer] user]
DESCRIPTION
The command removes a request, or requests, from the spool queue of a remote printer. is invoked by the command (see lp(1)).
At least one id or the name of a printer must be specified.
This command is intended to be used only by the spool system in response to the command (see lp(1)), and should not be invoked directly.
Options
The command recognizes the following options:
id Specifying a request ID (as returned by (see lp(1))) cancels the associated request, even if it is currently printing.
The maximum number of ids that can be specified is 50.
printer Name of the printer (for a complete list, use (see lpstat(1))). Specifying a printer cancels the request which is cur-
rently printing on that printer, if the request is owned by the user. If the or the option is specified, this option
only specifies the printer on which to perform the corresponding cancel operation.
Remove all requests owned by the user on the specified printer (see
printer). The owner is determined by the user's login name and host name on the machine where the command was invoked.
Empty the spool queue of all requests for the specified
printer. This form of invoking is useful only to users with appropriate privileges.
Remove any requests queued belonging to that user (or users)
for the specified printer. You can repeat the option to specify more users. The maximum number of users that can be
specified is 50. This form of invoking is useful only to users with appropriate privileges.
WARNINGS
A remote print request can be canceled only from the system on which the the original command was issued, and if the restrict cancel fea-
ture (see lpadmin(1M)) is enabled for the specified printer, a request belonging to this printer can be canceled only by the system admin-
istrator or the user who requested it.
This command is intended to be used only by the spool system in response to the command (see lp(1)), and should not be invoked directly.
AUTHOR
was developed by the University of California, Berkeley, and HP.
FILES SEE ALSO enable(1), lp(1), lpstat(1), accept(1M), lpadmin(1M), lpsched(1M), rlp(1M), rlpdaemon(1M), rlpstat(1M).
rcancel(1M)