LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux pause command not on wiki.linuxquestions.org/wiki/P_commands (http://www.linuxquestions.org/questions/linux-newbie-8/linux-pause-command-not-on-wiki-linuxquestions-org-wiki-p_commands-607420/)

JHMC 12-17-2007 03:43 PM

Linux pause command not on wiki.linuxquestions.org/wiki/P_commands
 
I have discovered the 'pause' command does not exist on my system.
It is also not listed under the wiki.linuxquestions.org/wiki/P_commands. My operating system is essentially that listed in LFS 6.2 and BLFS 6.2. the kernel is 2.6.16.27. What package normally would provide the utility?

Thanks
Jim McConville

colucix 12-17-2007 04:12 PM

I have never heard about it. If a pause command is meant to sleep a certain amount of time before executing the next statement in a script, this is the command
Code:

sleep
if it is meant to pause the execution of a script waiting for user input, this is a work for
Code:

read -p "Press enter to continue... "
Pause in a *nix system is a C function declared in the unistd.h header. Bye.

JHMC 12-17-2007 05:37 PM

Quote:

Originally Posted by colucix (Post 2993826)
I have never heard about it. If a pause command is meant to sleep a certain amount of time before executing the next statement in a script, this is the command
Code:

sleep
if it is meant to pause the execution of a script waiting for user input, this is a work for
Code:

read -p "Press enter to continue... "
Pause in a *nix system is a C function declared in the unistd.h header. Bye.

'read' is also not a command on my system. It is also declared in the unistd.h header. This header is is provided in the Linux-Libc-Headers package but apparently the declarations within unistd.h are not compiled as commands.

colucix 12-17-2007 06:31 PM

Quote:

Originally Posted by JHMC (Post 2993904)
'read' is also not a command on my system. It is also declared in the unistd.h header. This header is is provided in the Linux-Libc-Headers package but apparently the declarations within unistd.h are not compiled as commands.

read is a builtin command in sh, bash, ksh. In C-like shells a method to read a line of input is
Code:

set variable  =  $<
On my system the header unistd.h is mainly provided from the glibc package, that are the standard C libraries. What you're referring to are the kernel headers which basically provide definitions of the system calls. Anyway, returning to your original question, I don't think you will ever find a package providing a "pause" command, but maybe "sleep" is what you're looking for. Or, if you're experienced in C programming, you may build your customized "pause" command! ;)

JHMC 12-18-2007 12:56 PM

Quote:

Originally Posted by colucix (Post 2993950)
read is a builtin command in sh, bash, ksh. In C-like shells a method to read a line of input is
Code:

set variable  =  $<
On my system the header unistd.h is mainly provided from the glibc package, that are the standard C libraries. What you're referring to are the kernel headers which basically provide definitions of the system calls. Anyway, returning to your original question, I don't think you will ever find a package providing a "pause" command, but maybe "sleep" is what you're looking for. Or, if you're experienced in C programming, you may build your customized "pause" command! ;)

Thank you for your comments.
I can use the 'read -p "Press Enter to continue" ' in the bash environment for my needs.

Please close the inquiry.
Thanks,
Jim McConville


All times are GMT -5. The time now is 06:35 PM.