Find the answer to your Linux question:
Results 1 to 2 of 2
On my Red Hat Enterprise Linux 5/6 (4 has it too but without the corelimit variable) servers there is a line (in /etc/init.d/functions) that looks like this: corelimit="ulimit -S -c ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2011
    Posts
    9

    /etc/init.d/functions ulimit line question


    On my Red Hat Enterprise Linux 5/6 (4 has it too but without the corelimit variable) servers there is a line (in /etc/init.d/functions) that looks like this:
    corelimit="ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0}"

    Now DAEMON_COREFILE_LIMIT is defined in /etc/sysconfig/init (but not defined by default).
    So DAEMON_COREFILE_LIMIT is normally not defined.

    So my question is what is the :-0 syntax? I'm not familiar with that, but I suppose it has something to do with if that variable isn't defined then set it to 0. This may just be more of a generic scripting question, but I wasn't sure if other distros even had this line so I stuck with the RHEL forum.
    Can you provide a link that describes this specific syntax? I wouldn't even know what to google.

    Thanks!

  2. #2
    Just Joined!
    Join Date
    Nov 2011
    Posts
    9
    Think I answered my own question:
    www dot techtalkz dot com/gentoo-linux/262060-what-does-colon-minus-operator-do-runscript-shell.html

Posting Permissions

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