Quantcast
Channel: How to use export with Python on Linux - Stack Overflow
Viewing all articles
Browse latest Browse all 14

Answer by chingc for How to use export with Python on Linux

$
0
0

I've had to do something similar on a CI system recently. My options were to do it entirely in bash (yikes) or use a language like python which would have made programming the logic much simpler.

My workaround was to do the programming in python and write the results to a file.Then use bash to export the results.

For example:

# do calculations in pythonwith open("./my_export", "w") as f:    f.write(your_results)
# then in bashexport MY_DATA="$(cat ./my_export)"rm ./my_export  # if no longer needed

Viewing all articles
Browse latest Browse all 14

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>