The script calls grep without arguments one time, because @filelist includes '/home/sites/$arg1/users'. A correct solution would be to call find with appropriate arguments: find <path> -type d -mindepth 1 -maxdepth 1. This command simplifies also the script, because you don't need to munge @filelist, and doesn't overload system issuing repeated deep scans of file system.
Ciao, Valerio
In reply to Re: Re: Error in converted shell script (was: Pls Help)
by valdez
in thread Error in converted shell script (was: Pls Help)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |