Tuesday, July 27, 2010

a script to replace extention of files

Suppose the file extension is "foo".


#!/bin/bash

for f in `find . -name "*.foo" -type f`
do
newname=`echo "$f" | sed "s/\.foo$//"`
mv $f $newname
echo "mv $f to $newname"
done

exit 0

Monday, July 5, 2010

vmware fusion -- network no connection

The following tip can fix "network bridge device on /dev/vmnet0 is not running" failure.


$ sudo /Library/Application\ Support/VMWare Fusion/boot.sh –-restart