how to inherit bash function in a subshellSend array to subshell function with pipe?bash alias rename...

Is Odin inconsistent about the powers of Mjolnir?

Is it really ~648.69 km/s Delta-V to "Land" on the Surface of the Sun?

Why do implementations of "stdint.h" disagree on the definition of UINT8_C?

Did silent film actors actually say their lines or did they simply improvise “dialogue” while being filmed?

Is it allowed and safe to carry a passenger / non-pilot in the front seat of a small general aviation airplane?

How symbol § is called in German?

Looking for a new job because of relocation - is it okay to tell the real reason?

French equivalent of "Make leaps and bounds"

Is it true that control+alt+delete only became a thing because IBM would not build Bill Gates a computer with a task manager button?

Is there a loss of quality when converting RGB to HEX?

Does bottle color affect mold growth?

Will the Yamaha PM7X trumpet mute work stand-alone or do I need the Personal Studio SBX2 as well?

Why should public servants be apolitical?

Unexpected route on a flight from USA to Europe

What are the examples (applications) of the MIPs in which the objective function has nonzero coefficients for only continuous variables?

Why can I log in to my Facebook account with a misspelled email/password?

Beta value of the thermistor

How to help new students accept function notation

How can I tell if a flight itinerary is fake

Is this cheap "air conditioner" able to cool a room?

Secure my password from unsafe servers

What are good ways to improve as a writer other than writing courses?

Can ads on a page read my password?

How can glass marbles naturally occur in a desert?



how to inherit bash function in a subshell


Send array to subshell function with pipe?bash alias rename function with argumentsHow to save a function in bash for later use?Using a bash alias or function with environment variables on multiple linesCan I inherit “set +h” to a sub process?Simple function with `pbcopy` hangsbash function with dot in the nameHow to handle async subshell exitInstall bash function without user having to source a fileWhy is Bash automatically inserting `--color=auto` in `ls` command used in function






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















Is there any way to inherit a bash function or alias in a subshell?



I have this simple bash function and it doesn't get inherited:



my_func(){
echo 'foo'
}

export -f my_func;









share|improve this question

























  • How are you calling this in a subshell? It shouldn't even need to be exported.

    – Jesse_b
    5 mins ago




















0















Is there any way to inherit a bash function or alias in a subshell?



I have this simple bash function and it doesn't get inherited:



my_func(){
echo 'foo'
}

export -f my_func;









share|improve this question

























  • How are you calling this in a subshell? It shouldn't even need to be exported.

    – Jesse_b
    5 mins ago
















0












0








0








Is there any way to inherit a bash function or alias in a subshell?



I have this simple bash function and it doesn't get inherited:



my_func(){
echo 'foo'
}

export -f my_func;









share|improve this question














Is there any way to inherit a bash function or alias in a subshell?



I have this simple bash function and it doesn't get inherited:



my_func(){
echo 'foo'
}

export -f my_func;






bash alias bash-functions






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 14 mins ago









Alexander MillsAlexander Mills

2,4792 gold badges22 silver badges67 bronze badges




2,4792 gold badges22 silver badges67 bronze badges
















  • How are you calling this in a subshell? It shouldn't even need to be exported.

    – Jesse_b
    5 mins ago





















  • How are you calling this in a subshell? It shouldn't even need to be exported.

    – Jesse_b
    5 mins ago



















How are you calling this in a subshell? It shouldn't even need to be exported.

– Jesse_b
5 mins ago







How are you calling this in a subshell? It shouldn't even need to be exported.

– Jesse_b
5 mins ago












0






active

oldest

votes














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f534641%2fhow-to-inherit-bash-function-in-a-subshell%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f534641%2fhow-to-inherit-bash-function-in-a-subshell%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...