%define five 5 %if 0% ?five <= 5 %define string A %else %define string B %endifWhile this causes a parse error:
%define five 5.3 %if 0% ?five <= 5 %define string A %else %define string B %endifQuoting integers makes comparisons lexical. This will evaluate to false:
%define five 5 %if "0% ?five " == "5"Perhaps the most frustrating one for me was that commented out macros are expanded. This has surprising results if your macro expands to multiple lines. Say my spec file includes the following:%description #%foo blahAnd foo happens to expand to multiple lines:%define foo one\ two\ threeMy description will end up being:Description : two three blah
#!/bin/sh bus=$(lsusb grep TUSB2046 cut -d' ' -f2) dev=$(lsusb grep TUSB2046 cut -d' ' -f4 sed 's/:$//') port=4 hubctrl=/home/dannf/hub-ctrl if $hubctrl -b "$bus" -d "$dev" -v grep "Port $ port :" grep -q power; then toggle=0 else toggle=1 fi $hub-ctrl -b "$bus" -d "$dev" -P "$port" -p "$toggle"Note that not all hubs implement the port power feature - but luckily I had an unused one laying around that does. Unfortunately, one of my lights won't spin unless the physical power switch on the light is toggled - hopefully that's not true for yours.
The ability to review all mail to be sent while still offline. Using mutt, you can even edit them after "sending" but before they are actually sent. Undoubtedly, doing this often should be a hint to take more time before sending a message. However, at times there are good reasons why one might want to change a message which was composed e.g. on the plane (or not send it at all), and having to remove the message from the MTA queue and recreate it with the desired changes is unnecessarily time-intensive.
Wherever you may roam, you can send mail even if port 25 is blocked (provided that the IMAP or SSH ports are open).
All your mail is sent by a single host, so you don't have to worry about blacklisted IPs or disclosing information about your whereabouts.
It's trivial to post-process mail, including training spamfilters with it (as ham) through a server-side pickup script, as well as e.g. checking for missing attachments locally (you need a local sendmail script for reasons documented here).
Next.