The export -f
feature is specific to Bash:
parent
#!/bin/bash
plus1 () { echo $(($1 + 1)); }
echo $(plus1 8)
export -f plus1
./child 14 21
child
#!/bin/bash
echo $(plus1 $(($1 * $2)) )
More Related Contents:
- Difference between method and function in Scala
- Understanding how recursive functions work
- What is the difference between a ‘closure’ and a ‘lambda’?
- How could I create a function with a completion handler in Swift?
- Value receiver vs. pointer receiver
- How to explain callbacks in plain english? How are they different from calling one function from another function?
- Define table and column names as arguments in a plpgsql function?
- Correct use of modules, subroutines and functions in Fortran
- Computing the cross product of two vectors in Fortran 90
- Committing transactions while executing a postgreql Function
- Non exhaustive pattern in function in GHCi
- How is the square root function implemented? [closed]
- Static vs class functions/variables in Swift classes?
- Whats the difference of functions and methods in Go?
- R: 2 functions with the same name in 2 different packages
- Return a list from the function using OUT parameter
- Define a recursive function within a function in Go
- “Identifier Expected” or “Invalid Prototype” when implementing a scripted constant in Inno Setup
- When is a function too long? [closed]
- Return value from a VBScript function
- Execute a shell function with timeout
- Two ways of defining functions in Scala. What is the difference?
- Kotlin: How can I create a “static” inheritable function?
- use onedit() trigger on a specific sheet within google scripts for google sheets
- No function matches the given name and argument types
- How can I generate a list of function dependencies in MATLAB?
- MsgBox “” vs MsgBox() in VBScript
- How many lines of code should a function/procedure/method have? [duplicate]
- Proper use of modules in Fortran
- Static function variables in Swift