I have a .Net Core application that I'm running on a Mac.

I am currently using a shell script to launch the executable which is working well however I am wondering where the output from the script is being sent?

Specifically I have the CFBundleExecutable key in the Info.plist file pointing to the script:


The Launch.sh script in turn runs the .Net Core executable via an exec command like this:

bash -c "exec -a \"${Appname}\" nohup ./\"${Appname}\" > \"${Appname}\".Run.log 2>&1 &" 

Appname is the name of my executable and I do see the output from the app in the ${Appname}.Run.log file but I would like to know if there's a way to capture the output from the calling script Launch.sh?

  • How are you launch .Net? What are the contents of your bash file? Shouldn't it just end up on the terminal like any other application (unless you're redirecting the output)? – technogeek1995 Sep 17 at 16:42
  • post script. say how you are invoking the script with example. – historystamp Sep 17 at 16:55
  • why doesn't this work? myscript >>name-of-text-file.txt – historystamp Sep 17 at 16:56
  • in script { bash script statements } >>name-of-text-file.txt – historystamp Sep 17 at 16:56
  • 2
    What do you want to do with the output in Launch.sh, do you want to process it further? Preventing it from getting written to a log file is easy (just omit the > \"${Appname}\".Run.log 2>&1 part), but without further steps it will just dump the output into Terminal (if you call Launch.sh from there) or have it disappear in thin air (if the application is called from Finder). – nohillside Sep 18 at 17:59

You must log in to answer this question.

Browse other questions tagged .