News for hackers. Stuff that matters.
Re:Better bash in 15 minutes by anon4 on Wednesday April 16, 2014 @01:15PM (#7599072)
To add, if you need/want to you can write python and perl inline in bash like so:

  python3 - <<'END'
  print('hello world')
  END
The advantage is that you still have only one shell script to ship, which makes sense when the python code inside it is specific to that one script.

Remember to use the <<'END' variant so variable expansion isn't done inside the heredoc. On the other hand, $ doesn't do anything in python and if you're feeling like it (please make sure everybody else is also feeling like it) you can use variable substitution there, in effect generating a python script and executing it.

Re:Better bash in 15 minutes by vacri on Thursday April 17, 2014 @01:22AM (#7602107)
Playing around with it, I see that using <<'END' does not expand $variables in the block, but <<END does expand them. My google-fu is failing me; what's happening here?
Re:Better bash in 15 minutes by anon4 on Thursday April 17, 2014 @05:01AM (#7602606)
It's two different syntaxes. Like the difference between '$VAR' (no expansion, literal string) and "$VAR" (with expansion). See

http://tldp.org/LDP/abs/html/quoting.html

http://tldp.org/LDP/abs/html/here-docs.html