"\nOptions:\n\t-R\tchange files and directories recursively\n";
static const char chown_usage[] =
- "chown [OPTION]... OWNER[.[GROUP] FILE...\n\n"
+ "chown [OPTION]... OWNER[<.|:>[GROUP] FILE...\n\n"
"Change the owner and/or group of each FILE to OWNER and/or GROUP.\n"
"\nOptions:\n\t-R\tchange files and directories recursively\n";
goto bad_group;
} else {
groupName = strchr(*argv, '.');
+ if (groupName == NULL)
+ groupName = strchr(*argv, ':');
if (groupName) {
*groupName++ = '\0';
gid = strtoul(groupName, &p, 10);
fatalError( "%s: too few arguments\n", invocationName);
}
while (argc-- > 1) {
- if (recursiveAction (*(++argv), recursiveFlag, TRUE, FALSE,
+ if (recursiveAction (*(++argv), recursiveFlag, FALSE, FALSE,
fileAction, fileAction, NULL) == FALSE)
exit(FALSE);
}
const char *retryText;
int ch;
int found;
+ int len;
retryPat = NULL;
retryText = NULL;
if (*text == ch)
found = TRUE;
}
- if (found == FALSE)
- continue;
+ len=strlen(text);
+ if (found == FALSE && len!=0) {
+ return FALSE;
+ }
if (found == TRUE) {
- //printf("Got a match. pattern='%s' text='%s'\n", pattern, text);
- if (retryPat || retryText) {
- pattern = retryPat;
- text = ++retryText;
+ if (strlen(pattern)==0 && len==1) {
+ return TRUE;
+ }
+ if (len!=0) {
+ text++;
+ continue;
}
}