]> Nishi Git Mirror - dataworks.git/commitdiff
add the command to run the shell command
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Fri, 21 Jun 2024 00:50:57 +0000 (00:50 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Fri, 21 Jun 2024 00:50:57 +0000 (00:50 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@407 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

Client/client.c

index 565debe0a1679d05d90343474d81fd70a9510236..efd5905ab8db253c449a9792b54867639a5260a0 100644 (file)
@@ -218,7 +218,10 @@ int main(int argc, char** argv) {
                if((ch = fgetc(fp)) == EOF) break;
                if(ch == '\n') {
                        until_end = false;
-                       if(buf[0] == '.') {
+                       if(buf[0] == '!') {
+                               system(buf + 1);
+                               printf("\n");
+                       }else if(buf[0] == '.') {
                                if(__dw_strcaseequ(buf, ".bye") || __dw_strcaseequ(buf, ".quit")) {
                                        printf("Bye.\n");
                                        break;