LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   -/bin/sh vs /bin/sh (https://www.linuxquestions.org/questions/linux-newbie-8/bin-sh-vs-bin-sh-264302/)

DaHammer 12-09-2004 12:01 AM

-/bin/sh vs /bin/sh
 
What is the significance of the - when executing something in an inittab file? For instance:

::askfirst:-/bin/sh

vs

::askfirst:/bin/sh

Once upon a time I knew the answer, but it is hidden in some dark corner of my mind from which there seems to be no return and I'm not having much luck googling it. :)

rjlee 12-09-2004 03:41 AM

I can't see any reference to the - character in any inittab manual pages. However, using a + character will cause init to do utmp/wtmp housekeeping.

bostontech 12-09-2004 12:20 PM

I believe it prevents the changing of the flags in sh. This would be useful in setting $1 to -. Using + rather than - causes these flags to be turned off.

DaHammer 12-10-2004 09:42 PM

Thanks


All times are GMT -5. The time now is 12:05 PM.