Anyone, I am trying to setup pgsql-7.3.x on cygwin for production purposes. Now, I am thinking of creating a 'rc- like' script that will start/stop pgsql. I know pgsql can be stopped by passing a kill signal. pgsql pid is a dynamic information and it resides in /usr/share/postgresql/data/postmaster.pid together with other data. My problem now is, how am I be able to extract pgsql pid out from postmaster.pid via bash script.
I tried working with 'cat' program such as: ... #!/bin/bash pgsql_pid=`cat /usr/share/postgresql/postmaster.pid` #next is to extract pgsql pid out from $pgsql_pid ... Below is a typical postmaster.pid /usr/share/postgresql/postmaster.pid ... 2394 /var/lib/pgsql/data 5432001 0 ... Any hint how to extract '2394' out from postmaster.pid? Howard. Sulat @MU v.2.2 (Fresh) ....................................................................................... An extended module for MUWeb4 Project of Howard R. Bagcat Powered by GNU General Public License softwares. http://my.mu.edu.ph - a personalized portal is soon to come. -- Philippine Linux Users' Group (PLUG) Mailing List [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
