Sponsored Content
Full Discussion: Call function inside CASE
Top Forums Shell Programming and Scripting Call function inside CASE Post 302601304 by Corona688 on Thursday 23rd of February 2012 10:23:23 AM
Old 02-23-2012
It doesn't get executed because it's going into the DQ section, not the MP one. Cases end at ;;

You call a function like functionname, not functionname(), incidentally.
 

9 More Discussions You Might Find Interesting

1. Infrastructure Monitoring

diffrence between method call and function call in perl

Hello, I have a problem with package and name space. require "/Mehran/DSGateEngineLib/general.pl"; use strict; sub System_Status_Main_Service_Status_Intrusion_Prevention { my %idpstatus; my @result; &General_ReadHash("/var/dsg/idp/settings",\%idpstatus); #print... (4 Replies)
Discussion started by: Zaxon
4 Replies

2. Programming

how to call c executable inside c program??

hi guys i have only basic knowledge of c so guys plz help me ..... i want 2 call c executable which requires file name as argument and i need to modify file contents before calling that executable now my question is how can i call this c executable inside another c program with arguments ?? i... (9 Replies)
Discussion started by: zedex
9 Replies

3. Shell Programming and Scripting

Case inside case?

Im new to unix and shell scripting. I am required to write a program and im in the process of creating a menu system. I have my main menu but i want to be able to select an option that takes me onto another menu. I have tried doing this with the case statement with no luck so far. Wondering if it... (3 Replies)
Discussion started by: RAFC_99
3 Replies

4. Shell Programming and Scripting

After exit from function it should not call other function

Below is my script that is function properly per my conditions but I am facing one problem here that is when one function fails then Iy should not check other functions but it calls the other function too So anyone can help me how could i achieve this? iNOUT i AM GIVING TO THE... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies

5. Shell Programming and Scripting

Nested case inside awk

please let me know if the below code could be written efficiently inside single awk case "$INP" in ksh) cat catalog | awk 'BEGIN {FS=",";} { print $2 } END {}' ;; pset) cat catalog | awk 'BEGIN {FS=",";} { print $3 } END {}' ;; dml) cat catalog | awk 'BEGIN {FS=",";} {... (2 Replies)
Discussion started by: cvsanthosh
2 Replies

6. Shell Programming and Scripting

Help on case to call recursively in UNIX Shell Script

Hi, I am New to Unix Shell Scripting basically, i need some help in achieving a case statement in Shell script to call recursively That is if case having like 1 2 3 4 options , if user inputs 1 and gets executed case should ask for options again but user should not input the same input value 1,... (7 Replies)
Discussion started by: karthikram
7 Replies

7. UNIX for Beginners Questions & Answers

How to call variable inside a function globally?

Hi Gurus, Is there a way to call a variable inside a function anywhere within the script? Thanks. BR, Ernesto (2 Replies)
Discussion started by: ernesto
2 Replies

8. UNIX for Beginners Questions & Answers

Case inside While read File

Hi Experts, Need your guidance for case statement. I tried many way but no success yet.Now my existing code is doing something like below. Each Line of the input file contains one test case.#!/bin/bash FILE=$1 while read LINE; do do COMMAND done < $FILE Now I want to modify the code... (6 Replies)
Discussion started by: pradyumnajpn10
6 Replies

9. Shell Programming and Scripting

Need help on awk for printing the function name inside each function

Hi, I am having script which contains many functions. Need to print each function name at the starting of the function. Like below, functionname() { echo "functionname" commands.... } I've tried like below, func=`grep "()" scriptname | cut -d "(" -f1` for i in $func do nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
emulate_branch(3)					     Library Functions Manual						 emulate_branch(3)

Name
       emulate_branch, execute_branch - branch emulation

Syntax
       #include <signal.h>

       emulate_branch(scp, branch_instruction)
       struct sigcontext *scp;
       unsigned long branch_instruction;

       execute_branch(branch_instruction)
       unsigned long branch_instruction;

Description
       The  function  is  passed  a signal context structure and a branch instruction.	It emulates the branch based on the register values in the
       signal context structure.  It modifies the value of the program counter in the signal context  structure  (sc_pc)  to  the  target  of  the
       branch_instruction.   The program counter must initially be pointing at the branch and the register values must be those at the time of the
       branch.	If the branch is not taken the program counter is advanced to point to the instruction after the delay slot (sc_pc += 8).

       If the branch instruction is a `branch on coprocessor 2' or `branch on coprocessor 3' instruction, calls to  execute  the  branch  in  data
       space to determine if it is taken or not.

Return Values
       The  function returns a 0 if the branch was emulated successfully.  A non-zero value indicates the value passed as a branch instruction was
       not a branch instruction.

       The function returns non-zero on taken branches and zero on non-taken branches.

Restrictions
       Since is only intended to be used by it does not check its parameter to see if in fact it is a branch instruction.  It is really a stop gap
       in case a coprocessor is added without the kernel fully supporting it (which is unlikely).

See Also
       cacheflush(2), sigvec(2), signal(3)

								       RISC							 emulate_branch(3)
All times are GMT -4. The time now is 10:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy