I have a function hello, that is echoing i have put that function in .bash1 file then recalling the function with same user but with su command but it is not working.
username -> test
function -> below function save in .bash1
I run the below command from root
Above command giving me error
Note: What should i do that so my .bash1 function will run from root with su command, if it is not possible then what else the solution.
Last edited by Scott; 10-09-2013 at 09:19 AM..
Reason: Fixed code tags
hi Guys!
My requirement is... I need to get notified if somebody executes a specific commands...like kill or httpd stop.... something like that....
can somebody help me out...
Regards,
kiran (8 Replies)
a) cd /root/user/dir/sd/disk
./runInstaller -silent -responseFile
b) cd /root1/user1
cp /root/user/dir/sd/disk/ram.txt
now a) executes and starts running but b) interupts a) and is executed while a) is running on the other hand
so I want b) to start only after successfull completion of... (6 Replies)
hi,
i have to get the info between start to stop of a command execution
suppose,
if we execute the command like pkgadd then while its executing it ask some questions , i have to get total information untill pkgadd command complete into a perticular file. (3 Replies)
Hi Experts,
I am very much new to linux scripting, I am currently working on reducing my manual work and hence writing a script to automate few task.
I am running below command to snmpwalk the router..
snmpwalk -v 3 -u WANDL_SU -a MD5 -A vfipmpls -x DES -X VfIpMpLs -l authPriv... (19 Replies)
below is the output xml string from some other command and i will be parsing it using awk
cat /tmp/alerts.xml
<Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Hi,
I need to execute some commands in a directory.
script called test.sh from /usr/bin/
and the commands which are there in the script needs to be executed from /etc/ and come back to another directory /lib/ and execute some commands which are there in the script.
Hope you understand... (1 Reply)
I am having two different function in my script. When control is at first function I do not want to execute another function. How I can do that?
Help is highly appreiated as I am not sure How I can do it in Unix?
Thanks,
Vikram. (2 Replies)
Hello Experts,
I am still learning linux and have come across a question, hope to get some answer.
I have two servers, and both have the same version of svn client installed and both have the same user_id.
my SVN client version:
svn, version 1.6.11 (r934486)
compiled Mar 2 2011,... (4 Replies)
Hi Team
In the below code, irrespective of the if statement that gets executed, retcd is being assigned a standard value(1) instead of changing as per code. Could you please help to see where is it going wrong.
rval=0
CONF_FILE=/apps/wmroot/scripts/props/UMPath.properties
NOHUP="nohup"... (3 Replies)
Discussion started by: harishshankar
3 Replies
LEARN ABOUT HPUX
command
command(1) General Commands Manual command(1)NAME
command - execute a simple command
SYNOPSIS
command_name [argument ...]
DESCRIPTION
enables the shell to treat the arguments as a simple command, suppressing the shell function lookup.
If command_name is not the name of the function, the effect of is the same as omitting command.
Operands
recognizes the following operands:
command_name The name of a HP-UX command or a shell built-in command.
argument One or more strings to be interpreted as arguments to command_name.
The command is necessary to allow functions that have the same name as a command to call the command (instead of a recursive call to the
function).
Nothing in the description of is intended to imply that the command line is parsed any differently than any other simple command. For
example,
is not parsed in any special way that causes or to be treated other than a pipe operator or semicolon or that prevents function lookup on b
or c.
EXTERNAL INFLUENCES
Environment Variables
determines the search path used during the command search.
RETURN VALUE
exits with one of the following values:
o If fails:
126 The utility specified by the command_name is found but not executable.
127 An error occurred in the utility or the utility specified by command_name is not found.
o If does not fail:
The exit status of is the same as that of the simple command specified by the arguments: command_name[argument ...]
EXAMPLES
Create a version of the command that always prints the name of the new working directory whenever it is used:
cd() {
command "$@" >/dev/null
pwd
}
Circumvent the redefined command above, and change directories without printing the name of the new working directory:
SEE ALSO getconf(1), sh-posix(1), confstr(3C).
STANDARDS CONFORMANCE command(1)