Question about sed expression in cb-fortune script in Waldorf

view full story

http://crunchbang.org – p = os.popen("fortune -s | sed 's/^[ \t]*//'|sed 's/[ \t]/ /'|sed 's/^A:/\\nA:/'|sed 's/^--/\\n--/'","r")In the snippet of code above from cb-fortune in the github repo for Waldorf, only short fortunes (flag -s) are piped to sed, and then sed does 3 different substitutions. The way I understand it, sed makes the following 4 substitutions:sed 's/^[ \t]*//'1) zero or more lines starting with space + <TAB> will be replaced with nothingsed 's/[ \t]/ /'2) replace lines starting with space + <TAB> with a spac (HowTos)