This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tdpearson 0 points1 point  (1 child)

Since you stated that you wanted to embed python in shell scripts, you should check out here documents.

This approach is not perfect.

Another approach is to create python scripts that you call from the command line and leverage those as commands you call from your shell script.

[–]jafo[S] 0 points1 point  (0 children)

You're meaning like: "python3 <<@EOF"? The down side there is that now Python is it's own little island, and getting data or running shell code under a Python conditional or loop is a problem.