version 1.12, 2015/10/10 21:50:05 |
version 1.13, 2016/02/01 19:52:40 |
|
|
return rv; |
return rv; |
} |
} |
|
|
#define SHELLSPRINT printf("%s\n", sh) |
|
|
|
static int |
static int |
shells(int argc, char *argv[]) |
shells(int argc, char *argv[]) |
{ |
{ |
|
|
setusershell(); |
setusershell(); |
if (argc == 2) { |
if (argc == 2) { |
while ((sh = getusershell()) != NULL) |
while ((sh = getusershell()) != NULL) |
SHELLSPRINT; |
printf("%s\n", sh); |
} else { |
} else { |
for (i = 2; i < argc; i++) { |
for (i = 2; i < argc; i++) { |
setusershell(); |
setusershell(); |
while ((sh = getusershell()) != NULL) { |
while ((sh = getusershell()) != NULL) { |
if (strcmp(sh, argv[i]) == 0) { |
if (strcmp(sh, argv[i]) == 0) { |
SHELLSPRINT; |
printf("%s\n", sh); |
break; |
break; |
} |
} |
} |
} |