Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Scripting question - Page 2
Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Scripting question

  1. #11
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811

    Re: Scripting question


    You could use pidof, seems a bit simpler than what you have.
    Code:
    if [ ! pidof fetchmail ]
    then
    fetchmail
    fi
    Since this is *BSD, theres no pidof..

  2. #12

    Re: Scripting question


    Since this is *BSD, theres no pidof..
    Correct. I have no pidof command in PATH.

  3. #13

    Re: Scripting question

    I'm sure it would be a terrible pain to install.. but whatever.

  4. #14
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811

    Re: Scripting question


    I'm sure it would be a terrible pain to install.. but whatever.
    From where?? Since its part of GNUs SysVinit, then you'll have to get the tar ball and install from there, since no maintainer of BSD have made it available in the ports tree.. And mixing different init systems will never turn out right.. Might be the reason no one ported it..

  5. #15

    Re: Scripting question

    http://www.linuxfromscratch.org/view...06/psmisc.html

    pidof is a symlink to killall from psmisc.

  6. #16

    Re: Scripting question


    pidof is a symlink to killall from psmisc.
    iirc killall isnt on bsd boxen

  7. #17

    Re: Scripting question

    christ, and this is supposed to be a decent operating system? :P

    I don't see why BSD people couldn't install psmisc, though... I suppose they don't even have the /proc heirarchy, do they?

    (edit: smileys)

  8. #18

    Re: Scripting question


    iirc killall isnt on bsd boxen
    Now there, you're wrong. I definately have a killall on my system. I don't see how pidof can be a symlink of killall when they perform different functions though. Pidof is supposed to return the pid of a program, right?

  9. #19

    Re: Scripting question

    Now there, you're wrong. I definately have a killall on my system.
    I doubt it's the one that comes in the psmisc package, though...

    I don't see how pidof can be a symlink of killall when they perform different functions though. Pidof is supposed to return the pid of a program, right?
    It's possible for a program to act differently depending on it's name. On my system, pidof is actually a symlink of killall5 (just noticed, heh). killall5 is this fun program that will send a signal to every single process that's running... great fun to play with that... but pidof will simply return the pids of all instances of the programname:

    Code:
    feztaa@feztron:/home/feztaa$ ls -l `locate killall|grep bin` `which pidof`
    -rwxr-xr-x  1 root   root     28k Apr 20 19:03 /bin/killall
    lrwxrwxrwx  1 root   root      16 Apr 20 19:36 /bin/pidof -> ../sbin/killall5
    -rwxr-xr-x  1 root   root     8.8k Apr 20 19:36 /sbin/killall5
    feztaa@feztron:/home/feztaa$ pidof httpd
    212 211 210 209 208 178

  10. #20

    Re: Scripting question

    Interesting.

Similar Threads

  1. GUI Scripting
    By friskydrifter in forum Programming
    Replies: 3
    Last Post: 03-07-2006, 12:08 AM
  2. HPUX11 csh scripting question
    By in forum Programming
    Replies: 1
    Last Post: 08-29-2004, 04:04 AM
  3. bash scripting question
    By seanmclemon in forum Programming
    Replies: 7
    Last Post: 09-07-2003, 12:58 AM
  4. shell scripting question in hpux11
    By in forum Programming
    Replies: 0
    Last Post: 02-04-2003, 05:51 PM
  5. Bash scripting question
    By kenshi in forum Programming
    Replies: 6
    Last Post: 01-02-2003, 08:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •