Using export -f with broken xargs

I know there is a post here explaining how to do this, but I am doing exactly what it says, but cannot get my bash function to work with xargs. My bash profile looks like this:

export -f eb_deploy

function eb_deploy()
{
  echo Deploying $1
  eb deploy $1
}

function deploy_app()
{
aws elasticbeanstalk describe-environments --application-name $1 | grep EnvironmentName | cut -d: -f 2 | sed 's/\"//g' | sed 's/\,//g' | xargs -n1 eb_deploy
}

      

But I always get

xargs: eb_deploy: No such file or directory

      

Can anyone enlighten me as to why this is not working?

I'm currently running Mac OS X Yosemite Version: 10.10.3

+3
bash xargs macos


source to share


No one has answered this question yet

See similar questions:

146
Calling shell functions with xargs

or similar:

703
Variable definition with or without export
311
Make xargs execute the command once for each line of input
280
Calling multiple commands with xargs
146
Calling shell functions with xargs
120
How do I use> in xargs command?
25
Understanding the UNIX xargs command
2
Pipeline from long running process to xargs having no effect
0
Are you having trouble with a simple Bash if / elif / else statement
0
How can I use xargs to run a function in command substitution for each match?
-2
Can bash xargs plus bash paste output exactly 3 files when using 5 input files?



All Articles
Loading...
X
Show
Funny
Dev
Pics