What does “<

<() is called process substitution in the manual, and is similar to a pipe but passes an argument of the form /dev/fd/63 instead of using stdin. < reads the input from a file named on command line. Together, these two operators function exactly like a pipe, so it could be rewritten as find /bar -name … Read more

How to use the read command in Bash?

The read in your script command is fine. However, you execute it in the pipeline, which means it is in a subshell, therefore, the variables it reads to are not visible in the parent shell. You can either move the rest of the script in the subshell, too: echo hello | { read str echo … Read more

Python sum, why not strings? [closed]

Python tries to discourage you from “summing” strings. You’re supposed to join them: “”.join(list_of_strings) It’s a lot faster, and uses much less memory. A quick benchmark: $ python -m timeit -s ‘import operator; strings = [“a”]*10000’ ‘r = reduce(operator.add, strings)’ 100 loops, best of 3: 8.46 msec per loop $ python -m timeit -s ‘import … Read more