Check These Out
Cycles continuously through a string printing each character with a random delay less than 1 second. First parameter is min, 2nd is max. Example: 1 3 means sleep random .1 to .3. Experiment with different values. The 3rd parameter is the string. The sleep will help with battery life/power consumption.
$ cycle 1 3 $(openssl rand 100 | xxd -p)
Fans of "The Shining" might get a kick out of this:
$ cycle 1 4 ' All work and no play makes Jack a dull boy.'
Print the max wattage of the current power draw source for a Mac. Note that the current amount of watts drawn may be lower, particularly if a high-wattage adapter is plugged into a Mac that has a full battery.
With GNU chmod at least it is that simple.
This command uses the recursive glob and glob qualifiers from zsh. This will remove all the empty directories from the current directory down.
The **/* recurses down through all the files and directories
The glob qualifiers are added into the parenthesis. The / means only directories. The F means 'full' directories, and the ^ reverses that to mean non-full directories. For more info on these qualifiers see the zsh docs: http://zsh.dotsrc.org/Doc/Release/Expansion.html#SEC87
Replace 'csv_file.csv' with your filename.
Works with files containing spaces and for very large directories.
parallel can be installed on your central node and can be used to run a command multiple times.
In this example, multiple ssh connections are used to run commands. (-j is the number of jobs to run at the same time). The result can then be piped to commands to perform the "reduce" stage. (sort then uniq in this example).
This example assumes "keyless ssh login" has been set up between the central node and all machines in the cluster.
bashreduce may also do what you want.
Trace python statement execution and syscalls invoked during that simultaneously
enlubtsqyuse
$ cat /tmp/out
subsequently