Script to recursively copy and rename files with find and sed
bash |copy code |?
1 find aber/cs25010/ -iname "*.txt" -printf 'cp %p %p\n' \2 | sed 's/\.txt$/\.php/' \3 | while read l; do eval $l; done
Script to recursively copy and rename files with find and sed
bash |copy code |?
1 find aber/cs25010/ -iname "*.txt" -printf 'cp %p %p\n' \2 | sed 's/\.txt$/\.php/' \3 | while read l; do eval $l; done
If typing ifconfig is too simple for you here it is the geeky way to get the ip of your interfaces.
bash |copy code |?
1 ifconfig | sed -n "/en0//netmask/ p" | grep "inet " | awk '{print$2}' copy to .bash_profile:2 alias getip='ifconfig | sed -n "/en0//netmask/ p" | grep "inet " | awk ''{print\$2}'''