LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-01-2008, 01:45 PM   #1
ravi2ray
LQ Newbie
 
Registered: Oct 2008
Location: Kansas, MO
Posts: 9

Rep: Reputation: 0
Smile Error calling Functions: Command Not Found


I get a 'Command Not Found' error message when i call a function. It just doesn't go to the function. Can someone help?

for example:

Function functionName(){

receive 3 parameters ($1,$2,$3) then display a message
echo "something"

}

if functionName "$1" "$2" "$3"; then
....
...
..

fi
 
Old 12-01-2008, 02:18 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,750
Blog Entries: 1

Rep: Reputation: 238Reputation: 238Reputation: 238
That's helpful. How about the actual error message, the actual function code and how you're actually calling the function. From what you've provided, I would say you need to comment the line beginning with 'receive' since 'receive' isn't a command.
 
Old 12-03-2008, 01:14 PM   #3
ravi2ray
LQ Newbie
 
Registered: Oct 2008
Location: Kansas, MO
Posts: 9

Original Poster
Rep: Reputation: 0
re

Thanks for the reply.
I already have it working. I had the main in the wrong place and when it was compiling it wasn' finding my functions.
 
  


Reply

Tags
command, found


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
calling functions python UpLink2008 Programming 3 08-29-2008 01:57 AM
QT calling functions ... How? Four Programming 3 02-11-2007 11:32 AM
functions calling eth_header venkatesh111 Linux - Networking 1 04-22-2006 04:39 AM
Calling functions in C++ oulevon Programming 3 01-28-2005 04:14 PM
calling command line functions in java darthczyz Programming 2 12-09-2003 08:01 AM


All times are GMT -5. The time now is 03:57 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration