hi;
as a pseudo;
while read psLine
do
myFunc $psLine
done < ps
i don't want to redirect ps command's to a file. in fact, my problem is "how can i
read stdout line by line in bash, sed, awk or any?"
thanks,
hi;
as a pseudo;
while read psLine
do
myFunc $psLine
done < ps
i don't want to redirect ps command's to a file. in fact, my problem is "how can i
read stdout line by line in bash, sed, awk or any?"
thanks,
ps | while read psLine; do myFunc $psLine; done
ps | while read line; do
....
done
so thanks
so thanks agn
Hi agn,
The solution u provided is fine.
can't we do like ,
while read psLine
do
myFunc $psLine
done < `ps`
I tested ur solution and this one , the second one is diplaying the value with ^J as the delimiter.
Can somebody tell the difference between the two approches..
Thanks
Penchal
Can you paste the output ?