Check These Out
file(1) can print details about certain devices in the /dev/ directory (block devices in this example). This helped me to know at a glance the location and revision of my bootloader, UUIDs, filesystem status, which partitions were primaries / logicals, etc.. without running several commands.
See also:
$ file -s /dev/dm-*
$ file -s /dev/cciss/*
etc..
Using this command you can track a moment when usb device was attached.
From the cwd, recursively find all rar files, extracting each rar into the directory where it was found, rather than cwd.
A nice time saver if you've used wget or similar to mirror something, where each sub dir contains an rar archive.
Its likely this can be tuned to work with multi-part archives where all parts use ambiguous .rar extensions but I didn't test this. Perhaps unrar would handle this gracefully anyway?
The OPs solution will work, however on some systems (bsd), grep will not filter the data, unless the --line-buffered option is enabled.
The Piano Phase piece, by Steve Reich is a minimalist composition which is played on two pianos played at slightly different tempos, a task that's very difficult to accomplish by human players. The auditive effects produced by the cell displacement produce beautiful patterns.
See https://en.wikipedia.org/wiki/Piano_Phase . My rendered version: https://ydor.org/SteveReich/piano_phase.mp3
Requires sox to be installed on the system.
There are multiple videos on youtube showing different approaches and experiences to this interpretation. There is also a synthesized version.
Even if Bash can behave as a powerful pianist, a simple threaded version leaves full room to several time glitches and even negative displacements, the same issues that human pianists experience when playing the piece. The older the computer, the better the chaos added to the result due to the CPU load. Apparently that's the reason Steve Reich composes pieces such as this.
Without further ado, please give a warm welcome to the Bash minimalist player on synthesized two-threaded pianos. Please turn off your cellphones.
This will save your open windows to a file (~/.windows).
To start those applications:
$ cat ~/.windows | while read line; do $line &; done
Should work on any EWMH/NetWM compatible X Window Manager.
If you use DWM or another Window Manager not using EWMH or NetWM try this:
$ xwininfo -root -children | grep '^ ' | grep -v children | grep -v '' | sed -n 's/^ *\(0x[0-9a-f]*\) .*/\1/p' | uniq | while read line; do xprop -id $line _NET_WM_PID | sed -n 's/.* = \([0-9]*\)$/\1/p'; done | uniq -u | grep -v '^$' | while read line; do ps -o cmd= $line; done > ~/.windows