From e2510df9b64c85c3c9cc82a63d945db5b5c9a21a Mon Sep 17 00:00:00 2001 From: nishi Date: Fri, 21 Jun 2024 00:50:57 +0000 Subject: [PATCH] add the command to run the shell command git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@407 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- Client/client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Client/client.c b/Client/client.c index 565debe..efd5905 100644 --- a/Client/client.c +++ b/Client/client.c @@ -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; -- 2.43.0