check
This commit is contained in:
parent
aa11037bfc
commit
b286c33f68
@ -36,6 +36,7 @@ void cut(char **argv, char *command){
|
|||||||
|
|
||||||
int main (){
|
int main (){
|
||||||
char* argv[100];
|
char* argv[100];
|
||||||
|
int i;
|
||||||
while (1){
|
while (1){
|
||||||
char komenda[max], directory[max];
|
char komenda[max], directory[max];
|
||||||
if (getcwd(directory, sizeof(directory)) == NULL){
|
if (getcwd(directory, sizeof(directory)) == NULL){
|
||||||
@ -45,6 +46,9 @@ int main (){
|
|||||||
printf("[%s]$ ", directory);
|
printf("[%s]$ ", directory);
|
||||||
fgets(komenda, max, stdin);
|
fgets(komenda, max, stdin);
|
||||||
cut(argv, komenda);
|
cut(argv, komenda);
|
||||||
|
for(i=0; i<5; i++)
|
||||||
|
printf("%c ", argv[0][i]);
|
||||||
|
printf("\n");
|
||||||
if (argv[0]==NULL)
|
if (argv[0]==NULL)
|
||||||
continue;
|
continue;
|
||||||
else if (strcmp(argv[0], "exit") == 0)
|
else if (strcmp(argv[0], "exit") == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user