error when call function in bash script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting error when call function in bash script
# 8  
Old 02-17-2010
the same problem

Dear Diab,

the same problem, i need to mention that i am facing the same problem with all functions in the script.

Dear methyl,

Thanks for your advice

---------- Post updated at 02:54 PM ---------- Previous update was at 02:17 PM ----------

Dears

let me know if you need me to attach the original script to help to solve this problem

Thanks,
# 9  
Old 02-21-2010
Dears,

any updates?
# 10  
Old 02-21-2010
are your file that contain the function executable or not.

meaning permission is r-x or rwx?

BR
# 11  
Old 02-21-2010
Yes the script contain the function executable 755
# 12  
Old 02-21-2010
Yes please do post the whole script. Please blot out anything confidential with X's. Please state how the script was created (which editor?).

Please make it clear which Operating System you are using ( uname -a ) and which shell you have ( echo ${SHELL} ).

Please show some sample data (blotting anything confidential with X's) and show exactly what you type when running the script and exactly what messages and/or output data you receive. Precision is everything in computing.

If you are typing a line of this length from the command line it will not work in many shells because the line is too long (I've tried it), but it can work from a shell script in a modern shell (I've tried it). It is very important to know whether the commands are typed from a command line or inside a shell script and what environment we have here.
# 13  
Old 02-23-2010
the script details

deleted

Last edited by ahmed.gad; 04-06-2010 at 08:02 AM..
# 14  
Old 02-23-2010
Sorry I'm not going to be much help here. No access to SunOS. Is this Solaris 10 aka SunOS 5.10 or something much older?

Also, can't process the "rar" file in your post.

Possible that the original problem is an awk/nawk issue - maybe an awk specialist can comment on the length of the awk command.

Previous replies about not ending lines with semi-colon (Smilie characters still apply. This is unix shell not Oracle.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk call in bash function called with arugments not working, something lost in translation?

Hello, I have this awk code in a bash script to perform a find and replace task. This finds one unique line in a file and substitutes the found line with a replacement. #! /bin/bash # value determined elsewhere total_outputs_p1=100 # file being modified... (5 Replies)
Discussion started by: LMHmedchem
5 Replies

2. Shell Programming and Scripting

Call function as different user within the script

Hello For HP-UX, ksh shell, is it possible to define functions and call them by another user ? For example <function_name> ( ) { command1 command2 } su - <user> -c <function_name> Or the only option is defining the user in the function itself as follows - <function_name> ( )... (2 Replies)
Discussion started by: atanubanerji
2 Replies

3. Shell Programming and Scripting

Call function from another script

Hey, i got this 2 file. When i try to pick option 1, which is test1, it says ./test: test1: not found. Any idea on how i can fix it? #!/bin/sh QUIT=0 `dirname $0`/testfile while ; do testmenu read option case $option in 1) test1 ;; 2) test2 ;; 3) echo... (2 Replies)
Discussion started by: Nick1097
2 Replies

4. Shell Programming and Scripting

Script – Function Call

Hello, I have Individual function in my shell script , Function1 { Master activities } Function2 { Sub activities 1 } Function3 { Sub activities 2 } … (2 Replies)
Discussion started by: Shanks
2 Replies

5. Shell Programming and Scripting

Shell Script to call another function

Here is the following code : 1. # gcc -c test firstprog.c the above command will generate a executable file called "test " in which ever directory it is run. Assuming It will also return a value. 2. In the below SCRIPT . test is a file generated by compiling a c program... (3 Replies)
Discussion started by: Vabiosis
3 Replies

6. Web Development

Fatal Error: Call to undefined function imagefilter()

I am using PHP5 in ubuntu 9.10. First I installed PHP and GD as separate package. I tried doing manipulation with images using php image function. When I try using the function imagefilter(), it was not worked and got the solution that need to compile the PHP with the bundled version of GD. So... (0 Replies)
Discussion started by: skg
0 Replies

7. Shell Programming and Scripting

Bash: how to call function having it's name in variable?

Hello. Looking for a method of modularizing my bash script, I am stuck with such a problem. For example, I have: MODULE_NAME="test" FUNCTION_NAME="run" How do I can a function with name test_run? (4 Replies)
Discussion started by: FractalizeR
4 Replies

8. Shell Programming and Scripting

how can i call a function in shell script

i have a function written in one shell script and i want to call that function in another shell script and use the value returned by that script. can any one suggest me how can i do that? regards, Rajesh.P (4 Replies)
Discussion started by: rajesh.P
4 Replies

9. Shell Programming and Scripting

i want to call a oracle function in my shell script

i want to call a oracle function in my shell script (4 Replies)
Discussion started by: dineshr85
4 Replies
Login or Register to Ask a Question