10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I define aliases and save in rc file. what I see is that it isn't available in shell scripts. They are however available in interpretive or interactive sub-shell which I get when I give command bash
For ex.: I define
alias echo='echo -n'
it's unavailable in shell scripts but sub-shells. (5 Replies)
Discussion started by: ravisingh
5 Replies
2. Shell Programming and Scripting
I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line
if
then... (8 Replies)
Discussion started by: saku
8 Replies
3. Shell Programming and Scripting
Hi,
I'am using "time" to check execution time of some script. Is there any possibility to save time command result into a file ? (2 Replies)
Discussion started by: Physix
2 Replies
4. Shell Programming and Scripting
Hi
I have to execute the commands in .aliases file from a shell script
I tried
1.giving the alias directly in shell script
2.Giving the actually "value of alias" in the shell script
3. I tried giving both steps 1 and 2 inside ` quotes
Still nothing is working . It says command... (3 Replies)
Discussion started by: ssuresh1999
3 Replies
5. Shell Programming and Scripting
hi,
There is a shell including many functions, when I run ksh -x/-v to see the call sequence, but how do I know which function cost more?
Of course, use time CMD to get the scripts runnning time, while it can not tell me which cost more.
Thanks very much. (1 Reply)
Discussion started by: a2156z
1 Replies
6. Shell Programming and Scripting
I am not able to access the aliases in my environment within a Python script. If I pass the alias to os.system(), I get a message saying "sh: x: not found". I've tried sourcing my .bashrc file in the script, but this does not work. I would perfer not to source my or any rc file because this... (9 Replies)
Discussion started by: cooldude
9 Replies
7. Solaris
Hi all,
I am using Solaris 10 OS on X86. When I add a new user from command
useradd -d /export/home/vikas -m -s /bin/bash vikas
files local.cshrc, local.login, local.profile and .profile get copied to my home directory (i.e. /export/home/vikas) from /etc/skel/
Which file I have to change... (4 Replies)
Discussion started by: vikas027
4 Replies
8. Shell Programming and Scripting
Folks,
In shell script, can I mention a timeout for a command execution, afterwhich I want to exit from that particular line and proceed furthur.
I have part of my script as below:
******************************
cd $EXPECT_HOME
expect custom_install.exp mv... (5 Replies)
Discussion started by: gvsreddy_539
5 Replies
9. Shell Programming and Scripting
All,
I have a sh script of the following tune:
function a () { #functionality.. }
function b () { #functionnlity.. }
function check () { # this function checks for env and if all fine call build }
function usage () { #sh usage details }
function build () { #calls either a or b or... (5 Replies)
Discussion started by: vino
5 Replies
10. Programming
Hello to anyone who can help me!
I am in need of some help in procuring a more exact timing scheme in C for use with gcc.
I manage to get a timing in seconds just fine using difftime(). However, I need more accurate.. milliseconds... no clue.
Please help?
Brian (2 Replies)
Discussion started by: bcowan
2 Replies
times(1) User Commands times(1)
NAME
times - shell built-in function to report time usages of the current shell
SYNOPSIS
sh
times
ksh
times
DESCRIPTION
sh
Print the accumulated user and system times for processes run from the shell.
ksh
Print the accumulated user and system times for the shell and for processes run from the shell.
On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways:
1. Variable assignment lists preceding the command remain in effect when the command completes.
2. I/O redirections are processed after variable assignments.
3. Errors cause a script that contains them to abort.
4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari-
able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not
performed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
ksh(1), sh(1), time(1), attributes(5)
SunOS 5.10 15 Apr 1994 times(1)