OT - BASH question?

Alexander Dalloz ad+lists at uni-x.org
Sat Apr 16 00:46:33 UTC 2005


Am Sa, den 16.04.2005 schrieb Peter Volsted um 1:24:

> ps -eo "%p" | awk ' { print $1 > "proctest" }'

I think what Bill wants is differently.

http://www.tldp.org/LDP/abs/html/process-sub.html

while read line; do
   whatever
done < <(command)
   whatelse

proc=""
while read line; do
   proc="${proc} ${line}"
done < <(ps -eo "%p")
echo ${proc}

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG http://pgp.mit.edu 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.14_FC2smp 
Serendipity 02:46:06 up 3 days, 23:26, load average: 0.07, 0.13, 0.11 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20050416/5bd7e40f/attachment-0002.bin 


More information about the users mailing list