I have a file containing a list of directories. For instance
/foo/bar/dir1
/foo/bar/dir2
/foo/bar/dir3
I want to create all these directories. Here's what I did:
for dir in $(cat myfile); do mkdir $dir; done
What would be the correct way of doing this while avoiding the "useless use of cat"?
Ideally, answers would focus on Ksh88, but I'm also interested in other shells