Sponsored Content
Top Forums Shell Programming and Scripting function: not found error on solaris Post 302356670 by microstarwwx on Saturday 26th of September 2009 05:36:54 PM
Old 09-26-2009
I see. Thank you very much.

Quote:
Originally Posted by TonyFullerMalv
Looking at the Solaris man page for Bourne shell (sh) I cannot see function, what I do see is this form for defining a function:
Code:
Msg() {
    echo "$*"
}

I would usually script using Korn shell (ksh) the manpage for which does show the use of "function" to define a function.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Installer script -- function not found error

I am writing an installation script on AIX. This involves typical checks of some pre requisites like java, oracle, some version checks, disk space etc. It is a long script. I am facing a strange problem. There are a no of functions used in the script. What I see is that the installer complains of... (1 Reply)
Discussion started by: asutoshch
1 Replies

2. Shell Programming and Scripting

Error in functions : file2: function: not found

Hi I had written the small script for calling a function. bash-2.03$ more file2 function sai { echo " this is an example" } echo "This is main program" echo "calling the function" sai() when executing the above script. I am getting error. bash-2.03$ sh file2 file2: function:... (2 Replies)
Discussion started by: padarthy
2 Replies

3. Shell Programming and Scripting

procedure/function not found in .ksh

Hi all , I am getting an error "job_procfile not found" while excecuting a .ksh script. The script is used to create control-m ( scheduler ) jobs dynamically by reading parameter files ( flat filescomma seperated ) job_procfile is a function within the .ksh script The script is something... (8 Replies)
Discussion started by: rajesh_ramaoz
8 Replies

4. Shell Programming and Scripting

Function not found message

I have shell script as below: #!/bin/ksh #set -xv function set_variable { VARIABLE_NAME=$1 CURRENT_PATH=`pwd` if ; then echo "\nconfiguration_file.lst file not found in $CURRENT_PATH/common/common_scripts" exit 1; fi VARIABLE_COUNT=`cat... (2 Replies)
Discussion started by: findprakash
2 Replies

5. Programming

error:'MSG_R' undeclared (first use in this function) under Solaris

I read book Unix Network Programming written by Richard,and it define following code under unpipc.c #define SVMSG_MODE (MSG_R | MSG_W | MSG_R>>3 | MSG_R>>6) when I compile code,it raise following error: error:'MSG_R' undeclared (first use in this function) error:'MSG_W' undeclared (first use... (1 Reply)
Discussion started by: konvalo
1 Replies

6. Programming

stdio.h not found on Solaris 11

Hi friends, I hope u r doing well. I have just installed Solaris 11, and it seems that solaris 11 doesn't come with all the packages, one has to do everything manually. I download gcc from sunfreeware.com and installed it. After setting up the path variable, I tried to compile the hello world... (4 Replies)
Discussion started by: gabam
4 Replies

7. Shell Programming and Scripting

Bash script fails with "function: not found" error

Hello everyone, I am having problems figuring this out. This script below is supposed to create a list of file names with their "md5sum", in a file "lib-list.txt" When I run it "sh component-list.sh " I get this:component-list.sh: 4: component-list.sh: function: not found component-list.sh:... (4 Replies)
Discussion started by: joemb
4 Replies

8. UNIX for Dummies Questions & Answers

Function not found error

Hi All, I have written one shell script where I should call a function by passing variables to the actual function based on some condition. Each time I run the script I am getting the below error dsadm@bunyipd: /var/datastage/FRPDEVL/work/script> sh MClub_Validations.sh Iteration: 1... (1 Reply)
Discussion started by: tpk
1 Replies

9. Shell Programming and Scripting

Command not found, but using function in bash

In the bash below, if the answer is "y" then goto function remove. If the answer is "n" then goto the id variable line (where the date is inputted). However, I am getting command remove not found, but remove is a function not an command. I must have the syntax incorrect? Thank you :). ... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. Shell Programming and Scripting

Bash to search file for string and lauch function if found

In the bash below I am searching the filevirus-scan.log for the Infected files: 0 line (in bold) and each line for OK. If both of these are true then the function execute is automatically called and processing starts. If both these conditions are not meet then the line in the file is sent to the... (2 Replies)
Discussion started by: cmccabe
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)
All times are GMT -4. The time now is 10:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy