06-22-2017
Hi, Santiago.
Good to hear that it worked for you.
Note that there may be some differences between
ksh and
bash, so keep that man page handy
Best wishes ... cheers, drl
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is it possible to make function variables local?
I mean for example, I have a script variable 'name' and in function I have declared variable 'name'
I need to have script's 'name' have the same value as it was before calling the function with the same declaration.
The way to preserve a... (5 Replies)
Discussion started by: alex_5161
5 Replies
2. Shell Programming and Scripting
Hi All,
Can you please tell me how to execute local function written in a shell script with awk.
i tried with system command but its giving an error. (1 Reply)
Discussion started by: krishna_gnv
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have the following statement which parses a string for me and prints it out:
l_comp="dc000.runksh.test.ksh|
$g_sql/dc0000.runksh_test.sql|new.dat|control.ctl"
echo $l_comp | awk -F"|" '{ for ( i = 1; i <= NF; i++) { print $i; } } '
Rather then printing the data, I would like to... (5 Replies)
Discussion started by: CAGIRL
5 Replies
4. Shell Programming and Scripting
The following code doesn't work properly which means it doesn't displays remote output.
#!/bin/ksh
#################### Function macAddressFinder ########################
macAddressFinder()
{
`ifconfig -a > ipInterfaces`
`cat ipInterfaces`
}... (2 Replies)
Discussion started by: presul
2 Replies
5. UNIX for Dummies Questions & Answers
I wrote the following Makefile:
dirs := a b c d
files := $(foreach dir,$(dirs),$(wildcard $(dir)/*))
.PHONY: all
all:
touch $(files)
The first two lines are taken from GNU make tutorial, Section 8.5 The foreach Function. I would expect the recipe
touch $(files)
to be... (2 Replies)
Discussion started by: ybelenky
2 Replies
6. Programming
As I know threads share the memory. But, what about the local variables in the thread function? if i call multiple threads would they allocate seperate local variables for themselves?
like
thread_func()
{
int i, j;
string...
}
Are the above local variables defined for each of... (1 Reply)
Discussion started by: saman_glorious
1 Replies
7. Programming
Hi,
If I have a code like this, what are the potential problems do you see?
const char* const retString() {
return "hello"; /* string literal */
}
My questions are:
a) Since the string literal which is already a constant read only data (cannot be... (4 Replies)
Discussion started by: royalibrahim
4 Replies
8. Shell Programming and Scripting
Legends,
I am not able to set "expr" function in ksh script.
Below is the sample code i used, and output is as "Syntax error"
Please help me to come out of it.
OUTPUT (9 Replies)
Discussion started by: sdosanjh
9 Replies
9. Programming
Hi,
I am working in UEFI EDK2 Bios source. We created a platform related new package in the EDK2 source. I find a strange issue with the platform related code we added.
When I did source level debugging I noticed the
local variable in a C function is not getting created in stack when its... (6 Replies)
Discussion started by: Divya R
6 Replies
10. Shell Programming and Scripting
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
LEARN ABOUT OPENDARWIN
times
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)