Al prossimo deficiente che mi dice che Windows è più facile di Linux gli metto le mani addosso.

Quando mi è passata vi spiego

Changing the Domain Name on WordPress Multi-site

At work I’ve set up a little WordPress network to record workflow notes. One blog for quality management, one used by person in charge of the concrete plant – I do mildly dislike the word “manager” as it is wildly misused here in Italy – and another for the administrative office. Too bad I just used the hostname “laboratorio.local“.

Shame on me. I relied on nmb to resolve names. It was easy. It just worked. Too bad it does not word across VPN. And Android phones also don’t like them at all.

Now all those blogs are really private and it may be good not to let them be read over the VPN. But when our phones will be hooked to an eventual inner WiFi network I will really need to update this.

Oh, I know there is Moving WordPress Multisite on WordPress Codex, but it just is a little fearsome. Changing the Domain Name on WordPress Multi-site from AccuWeaver LLC looks a little easier to follow.

As usual knowledge is power. I should study Codex a little more

Continue reading

How can I escape white space in a bash loop list? – Stack Overflow

I find this nice and elegant. The other proposed solutions may handle files with newline in their name, but currently I see such file names as nonsense
<span class="pln">find </span><span class="pun">.</span> <span class="pun">-</span><span class="pln">type d </span><span class="pun">|</span> <span class="kwd">while</span><span class="pln"> read file</span><span class="pun">;</span> <span class="kwd">do</span><span class="pln"> echo $file</span><span class="pun">;</span> <span class="kwd">done</span>

However, doesn’t work if the file-name contains newlines. The above is the only solution i know of when you actually want to have the directory name in a variable. If you just want to execute some command, use xargs.

<span class="pln">find </span><span class="pun">.</span> <span class="pun">-</span><span class="pln">type d </span><span class="pun">-</span><span class="pln">print0 </span><span class="pun">|</span><span class="pln"> xargs </span><span class="pun">-</span><span class="lit">0</span><span class="pln"> echo </span><span class="str">'The directory is: '</span>

Sorgente: How can I escape white space in a bash loop list? – Stack Overflow

Furthermore BASH Shell: For Loop File Names With Spaces suggets:

find . -print0 | while read -d $'\0' file
do
  echo -v "$file"
done

that should handle even the weirdest file name

Continue reading