i have a bunch of directories, and i want to create a small file in each one.
here's what i have so far:
#!/bin/sh
for dir in "`ls -d *`" ; do
(cd "$dir" ; touch bit)
done
for some reason, it doesn't work. it just spits the directory listing out. i'd love your help!
zsh!
euterpe% for i (*) touch $i/bit
:D
Shit man ZSH rocks. I recently did something like this where my script created a directory for every day of the month:
for (( i=1; i<30; i++ )); do mkdir 9-$i-2008; done