Distinguish from the contents of a file which are the processes (NEWTHREAD)
FOR ANYONE WHO HAS THE SAME PROBLEM
Distinguish from the contents of a file which are the processes and print them
I have a file with name procs and the following content:
date
httpd
ps
tty
.....
how can i recognize which of these names are processes names and print only them
My solution is
for i in procs
do
if [ -p $i]
echo $i
done
but is does not work. I would appreciate any help.
|