shell - Looping through content of the current directory -
what best way inside directory , determine whether content directories or files. homework question.
my homework requires me write script counts number of directories, files, how many executable, writeable, , readable.
assuming you're talking bourne shell family, take @ -d, -x, -w... , i'm guessing -r tests. how loop works in bash see how iterate on files... general idea
for var in directory/*; #stuff $var done but there particulars relating spaces in filenames can make trickier.
Comments
Post a Comment