I want to iterate over each line in the output of: ls -l /some/dir/*
ls -l /some/dir/*
Right now I\'m trying: for x in $(ls -l $1); do echo $x; done
for x in $(ls -l $1); do echo $x; done
The read(1) utility along with output redirection of the ls(1) command will do what you want.