Search Results

Search: Posts Made By: ashwini.engr07
3,351
Posted By ashwini.engr07
python module issue?
Sadly that didn't work:confused:. The user field seems to be compulsory.

But I found something here. In my python script, the python module used for writing into syslog and console is the...
3,351
Posted By ashwini.engr07
Executing python scripts via cron job
Hi,

I'm executing a python script via cron job. The way it is set up is, I'm editing a file called local[ inside /etc/cron.d/.The local file content is as follows:

00 22 * * * root su - -c...
Forum: Programming 10-15-2011
15,088
Posted By ashwini.engr07
Thanks Alister! But i checked the strtok syntax...
Thanks Alister!
But i checked the strtok syntax shows: char * strtok ( char * str, const char * delimiters );

This was a sample program i was trying. In the original code, the cmd is actually...
Forum: Programming 10-15-2011
15,088
Posted By ashwini.engr07
strtok() gives segmentation fault!!
#include<iostream.h>
#include<string>
#include<stdio.h>

int main()
{
char *cmd="delete backup backup-iso image a.iso b.iso c.iso d.iso";
char *tokenized_cmd,*sub_cmd;

...
2,919
Posted By ashwini.engr07
Oh! I totally forgot to replace the echo...
Oh! I totally forgot to replace the echo statement with cat.
Thanks a lot to all of u. :)
2,919
Posted By ashwini.engr07
Hi, Thanks Alister. I tried this. but it...
Hi,
Thanks Alister. I tried this. but it echoes blank.

I tried with simple commands at prompt and echoed $cmd_status like:
wc -k; echo $? > cmd_status
prints blank
(wc -k; echo...
2,919
Posted By ashwini.engr07
Thanks binlib. Yes I'm aware of the PIPESTATUS...
Thanks binlib. Yes I'm aware of the PIPESTATUS array. But it works only with piped foreground processes and not background ones.

I want the processes to run in background because I want them to be...
2,919
Posted By ashwini.engr07
Thanks Ahamed :) But i want the output of $cmd to...
Thanks Ahamed :) But i want the output of $cmd to be printed on both console and to log-file together!

I wonder if this make sense: having a command that that can take PID as input and give us the...
2,919
Posted By ashwini.engr07
how to exit status of a piped process ???
Hi,

I've searched the related threads both in this forum and others in google and found the solution to be working too in most of the places. But somehow it's not working for me.

$cmd | tee...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 10:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy