Let’s say you have a list of files with blank spaces in their name : foie gras final 2-1.eps foie gras step 3.eps foie gras step 4.eps foie gras step 6.eps foie gras step 7.eps If you want to translate blank space to hyphen, use the following command : for file in foie*; do mv …
bash
Automatically set title on iTerm tabs
If like me you use iTerm for your terminal sessions, this is the tips to dynamically set the tab title. As I’m using the bash shell, the tab title can be automatically set with the PROMPT_COMMAND variable. You can set this variable in /etc/profile or in your .bashrc Mine is like this : export PROMPT_COMMAND=’echo …