vmahendru
asked on
how can i store the o/p of Unix cmd to Shell ver.
i want to store the Output of Cmd like
" wc -c filename" in a Shell var...
how can i do it..
thanx
" wc -c filename" in a Shell var...
how can i do it..
thanx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it did not work out... first tell me
can u please explain the steps .. i am not very good in UNIX...
can u please explain the steps .. i am not very good in UNIX...
What did not work when you tried it?
In which shell do you want to store a variable?
In which shell do you want to store a variable?
ASKER
hi ozo
i have written a program in c and in this program made one system call for grep... i want to store the output of this grep Cmd in my C program... can u help me how can i do it..
thanx
i have written a program in c and in this program made one system call for grep... i want to store the output of this grep Cmd in my C program... can u help me how can i do it..
thanx
From C, you might call grep with popen insteead of system.
ASKER
thanx ozo, i got the answer
ASKER