|
@@ -635,6 +635,7 @@ void pr_encours(void) |
|
|
#define CHLOG "/var/log/user.log" |
|
|
#define CHLOG "/var/log/user.log" |
|
|
#define CHLOGREP "/var/log/user.log|grep " |
|
|
#define CHLOGREP "/var/log/user.log|grep " |
|
|
#define CUT6 "|cut -d' ' -f6" |
|
|
#define CUT6 "|cut -d' ' -f6" |
|
|
|
|
|
#define CUTM45 "|cut -d' ' -f1-3,6-" |
|
|
#define CUT7S "|cut -d' ' -f7-" |
|
|
#define CUT7S "|cut -d' ' -f7-" |
|
|
|
|
|
|
|
|
#define FHISTO ".octave_history" |
|
|
#define FHISTO ".octave_history" |
|
@@ -724,22 +725,27 @@ pid_t pid; |
|
|
break; |
|
|
break; |
|
|
case 'E' : |
|
|
case 'E' : |
|
|
if (*(cmd+1) != '\0') printf("ignore %s\n",cmd+1); |
|
|
if (*(cmd+1) != '\0') printf("ignore %s\n",cmd+1); |
|
|
sprintf(com,"grep '%s\\[%d\\]%s' %s",NPROG,pid,".*ERR: ",CHLOG); |
|
|
|
|
|
|
|
|
sprintf(com,"grep '%s\\[%d\\]%s' %s%s",NPROG,pid,".*ERR: ", |
|
|
|
|
|
CHLOG,CUTM45); |
|
|
comsh(com); |
|
|
comsh(com); |
|
|
break; |
|
|
break; |
|
|
case 'L' : |
|
|
case 'L' : |
|
|
if (*(cmd+1) != '\0') printf("ignore %s\n",cmd+1); |
|
|
if (*(cmd+1) != '\0') printf("ignore %s\n",cmd+1); |
|
|
sprintf(com,"grep '%s\\[%d\\]' %s%s",NPROG,pid, |
|
|
|
|
|
CHLOGREP,"-v 'Re[pq]. '"); |
|
|
|
|
|
|
|
|
sprintf(com,"grep '%s\\[%d\\]' %s%s%s",NPROG,pid, |
|
|
|
|
|
CHLOGREP,"-v 'Re[pq]. '",CUTM45); |
|
|
comsh(com); |
|
|
comsh(com); |
|
|
break; |
|
|
break; |
|
|
case 'T' : |
|
|
case 'T' : |
|
|
if (*(cmd+1) != '\0') |
|
|
|
|
|
sprintf(com,"grep '%s\\[%d\\].*%s' %s%s",NPROG,pid,cmd+1, |
|
|
|
|
|
CHLOGREP," 'Re[pq]. '"); |
|
|
|
|
|
else |
|
|
|
|
|
sprintf(com,"grep '%s\\[%d\\]' %s%s",NPROG,pid, |
|
|
|
|
|
CHLOGREP," 'Re[pq]. '"); |
|
|
|
|
|
|
|
|
if (*(cmd+1) != '\0') { /* avec parametre */ |
|
|
|
|
|
if ((*(cmd+1) == '+') && (*(cmd+2) != '\0')) { /* script + param */ |
|
|
|
|
|
sprintf(com,"./t1.sh %d %s >.Trav%d",pid,cmd+2,pid); |
|
|
|
|
|
comsh(com); |
|
|
|
|
|
sprintf(com,"cat .Trav%d",pid); |
|
|
|
|
|
} else sprintf(com,"grep '%s\\[%d\\].*%s' %s%s%s",NPROG,pid,cmd+1, |
|
|
|
|
|
CHLOGREP," 'Re[pq]. '",CUTM45); |
|
|
|
|
|
} else |
|
|
|
|
|
sprintf(com,"grep '%s\\[%d\\]' %s%s%s",NPROG,pid, |
|
|
|
|
|
CHLOGREP," 'Re[pq]. '",CUTM45); |
|
|
comsh(com); |
|
|
comsh(com); |
|
|
prInOut(); |
|
|
prInOut(); |
|
|
break; |
|
|
break; |
|
|