Sponsored Content
Top Forums Shell Programming and Scripting function: not found error on solaris Post 302356666 by TonyFullerMalv on Saturday 26th of September 2009 05:16:42 PM
Old 09-26-2009
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
mdoc-assemble(1)					      General Commands Manual						  mdoc-assemble(1)

NAME
mdoc assemble - Compile documentation for use in monodoc(1) SYNOPSIS
mdoc assemble [OPTIONS]+ PATHS+ DESCRIPTION
mdoc assemble creates .tree and .zip files from PATHS for use in the monodoc(1) documentation browser. The input files must have a supported format, specified with the --format option. The .tree and .zip files are copied into monodoc's sources directory, alongside a .source file which is used by monodoc(1) to specify where the documentation should be displayed. The .source file has the following format: <?xml version="1.0"?> <monodoc> <node label="LABEL" name="PATH" parent="PARENT"> <node label="LABEL2" name="PATH2" /> <!-- ... --> </node> <source provider="PROVIDER" basefile="BASEFILE" path="PATH" /> <!-- other <source/> elements --> </monodoc> The /monodoc/node node is an optional node that specifies where in the monodoc tree the documentation should be displayed, and //node ele- ments may be nested to any depth to create trees. //node/@label is the label that will be displayed within the monodoc tree. //node/@name is the name of the monodoc tree node, and may be used as the value of the /monodoc/source/@path value. //node/@parent is the node name to use as the parent node. $MONO_INSTALL_PREFIX/lib/monodoc/monodoc.xml contains a list of such names, and this can be any //node/@name value. If the //node/@parent value isn't found, then it's inserted under the "Various" tree node. The /monodoc/source/@provider attribute specifies which format provider should be used when reading the .tree and .zip files; this must correspond to one of the --format values. The /monodoc/source/@basefile attribute specifies the filename prefix for the documentation files. This must be the same prefix as used with the --out parameter. There should be no filename extension on this value. The /monodoc/source/@path attribute specifies the parent node in monodoc(1)'s tree view where the documentation will be inserted. See the $MONO_INSTALL_PREFIX/lib/monodoc/monodoc.xml file for a list of PATH values (the //node/@name values), or it may be a //node/@name value in the same .source file. Once the BASEFILE.source has been written, the documentation can be installed so that monodoc(1) will display the documentation with the command: cp BASEFILE.source BASEFILE.tree BASEFILE.zip `pkg-config monodoc --variable=sourcesdir` OPTIONS
-f, --format=FORMAT Specifies the documentation format used within PATHS. Valid FORMAT values include: ecma, ecmaspec, error, hb, man, simple, and xhtml. See the FORMATS section below for more information about these formats. The default format (if none is specifed) is ecma. The --format option may be interleaved with PATHS to change the format used for the remaining parameters (until the next --format option is seen), e.g.: mdoc assemble -o PREFIX A B --format=man C D --format=xhtml E will assemble directories A and B with the ecma format, files C and D with the man formt, and directory E with the xhtml format. -o, --out=PREFIX Specify the output file prefix. mdoc assemble creates the files PREFIX.zip and PREFIX.tree. -h, -?, --help Display a help message and exit. FORMATS
The following documentation formats are supported: ecma The Mono ECMA Documentation Format, an XML documentation format with one file per type. See the mdoc(5) man page for more information. ecmaspec The Mono ECMA Specification Documentation Format. This is not the format you're looking for; it is the format used to represent the ECMA-334 (C#) standard within monodoc(1). It is not used to display class library documentation; for class library documentation, use the ecma format. error The Error Documentation Format is used to present detailed error messages, and is used in monodoc(1)'s "C# Compiler Error Reference" tree. In this format, PATHS is a configuration file, containing the XML: <ErrorProviderConfig> <FilesPath>../../mcs/errors</FilesPath> <Match>cs????*.cs</Match> <ErrorNumSubstringStart>2</ErrorNumSubstringStart> <ErrorNumSubstringLength>4</ErrorNumSubstringLength> <FriendlyFormatString>CS{0:0###}</FriendlyFormatString> </ErrorProviderConfig> The elements mean: /ErrorProviderConfig/FilesPath Specifies where to look for files. /ErrorProviderConfig/Match Specifies the filename pattern to look for within the /ErrorProviderConfig/FilesPath directory. /ErrorProviderConfig/ErrorNumSubstringStart Specifies where within the filename the error number starts. /ErrorProviderConfig/ErrorNumSubstringLength Specifies how many characters after /ErrorProviderConfig/ErrorNumSubstringStart to use for the error number. /ErrorProviderConfig/FriendlyFormatString Specifies the formatting/display of the node in the monodoc(1) tree. For each file found, it is converted to HTML with C# syntax coloring applied. simple The Simple Documentation Format file format recursively adds all files and directories underneath PATHS. When displayed, HTML files are displayed as-is. Text files are converted into HTML by translating each newline into an HTML <br> element. No other file type is sup- ported. man The Man Page Documentation Format displays groff man pages. (This is not a full groff parser, and only handles the man page constructs used within the mono man pages.) PATHS is a set of XML files containing: <?xml version="1.0"?> <manpages> <manpage name="NAME" page="FILE" /> </manpages> There may be multiple //manpage elements within the root /manpage element. The /manpages/manpage/@name attribute contains the display name for the tree view node, which is also the URL of the man page when using monodoc(1)'s Lookup URL command (before prefixing with a man: prefix). Thus, if /manpages/manpage/@name contains mono(1), then man:mono(1) can be used in the Lookup URL command to view the mono(1) man page. The /manpages/manpage/@page attribute is the filename that contains the man page. If this file does not exist, then /manpages/man- page/@name will not be displayed within the tree view. xhtml The XHTML provider interprets PATHS as a Windows Help file XHTML TOC file and looks for referenced documents to create the help source. SEE ALSO
mdoc(1), mdoc(5), monodoc(1) MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details. WEB SITE
See also: http://www.mono-project.com/mdoc mdoc-assemble(1)
All times are GMT -4. The time now is 01:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy