Re: suspend command - curious of function
On Fri, Sep 19, 2008 at 11:51:45PM +, ropers wrote: | 2008/9/20 Ingo Schwarze [EMAIL PROTECTED]: | In OpenBSD, most shell builtins and shell command aliases do not have | their own man page or man page symlink. Such symlinks should not be | added: Many shells have similar builtins, so which shell's man page | would you link? | | Would it be useful to have man pages for built-ins, but make those man | pages disambiguation pages that explain that the command in question | is a shell built-in command, and how to find the relevant info on the | respective shell's main man page? | | Another idea would be to make man look at $SHELL and serve up a | relevant man page on that basis. This would require adding that logic | to man though. I think it's an education / experience issue. If you know a command to be an alias or a builtin, you should know not to go look for a manpage for that command. Of course, the question then arrises .. how do you know wether a command is an alias or builtin ? The fact that a manpage is missing for a certain command should be a big hint (in OpenBSD base, that is), but for certainty there's still which(1) and type (an alias to a builtin, at least in ksh(1)). After learning a command is builtin, the user can then read the shells manpage and search for the command in the manpage text. Users unfamiliar with the above are probably somewhat new to the environment and should therefore consult a book on UNIX systems. Cheers, Paul 'WEiRD' de Weerd -- [++-]+++.+++[---].+++[+ +++-].++[-]+.--.[-] http://www.weirdnet.nl/
Re: suspend command - curious of function
I agree entirely. While man(1) is great, which(1) is also an essential tool. Learn to love it. paul On 20/09/2008, at 7:27 PM, Paul de Weerd wrote: On Fri, Sep 19, 2008 at 11:51:45PM +, ropers wrote: | 2008/9/20 Ingo Schwarze [EMAIL PROTECTED]: | In OpenBSD, most shell builtins and shell command aliases do not have | their own man page or man page symlink. Such symlinks should not be | added: Many shells have similar builtins, so which shell's man page | would you link? | | Would it be useful to have man pages for built-ins, but make those man | pages disambiguation pages that explain that the command in question | is a shell built-in command, and how to find the relevant info on the | respective shell's main man page? | | Another idea would be to make man look at $SHELL and serve up a | relevant man page on that basis. This would require adding that logic | to man though. I think it's an education / experience issue. If you know a command to be an alias or a builtin, you should know not to go look for a manpage for that command. Of course, the question then arrises .. how do you know wether a command is an alias or builtin ? The fact that a manpage is missing for a certain command should be a big hint (in OpenBSD base, that is), but for certainty there's still which(1) and type (an alias to a builtin, at least in ksh(1)). After learning a command is builtin, the user can then read the shells manpage and search for the command in the manpage text. Users unfamiliar with the above are probably somewhat new to the environment and should therefore consult a book on UNIX systems. Cheers, Paul 'WEiRD' de Weerd -- [++-]+++.+++[---].+++[+ +++-].++[-]+.--.[-] http://www.weirdnet.nl/
Re: suspend command - curious of function
On Sat, Sep 20, 2008 at 6:27 PM, Paul M [EMAIL PROTECTED] wrote: I agree entirely. While man(1) is great, which(1) is also an essential tool. Learn to love it. ...if you are a csh user. Otherwise type is better than which.
Re: suspend command - curious of function
On 16:40 Fri 19 Sep, Brian Drain wrote: What does the suspend command do? I cannot find a man page on it, or entry in the FAQ, or anything useful in the mailing list archives or google (seems most deal with laptop suspend/restore).. When I type suspend at the cmd line, it drops me past the command line. Can't ^C or ^Z or anything out of it. Does it have a purpose? This is being run from an i386 desktop and I have no real need for it, just curious about it's function. hi! Looks like it's shell-related job control function, it is nothing related to an OS. in ksh(1) it is an alias: suspend='kill -STOP $$' for bash(1) it looks like this: suspend [-f] Suspend the execution of this shell until it receives a SIGCONT signal. The -f option says not to complain if this is a login shell; just suspend anyway. The return status is 0 unless the shell is a login shell and -f is not supplied, or if job control is not enabled. -- Vladimir Kirillov
Re: suspend command - curious of function
What does the suspend command do? I cannot find a man page on it, or entry in the FAQ, or anything useful in the mailing list archives or google (seems most deal with laptop suspend/restore).. When I type suspend at the cmd line, it drops me past the command line. it's a command built in to the shell. from the csh manpage: suspend Causes the shell to stop in its tracks, much as if it had been sent a stop signal with ^Z. This is most often used to stop shells started by su(1). [EMAIL PROTECTED]:~ su Password: # suspend [1] + 26084 Suspended (signal)su [EMAIL PROTECTED]:~ jobs [1] + Suspended (signal)su [EMAIL PROTECTED]:~ fg su #
Re: suspend command - curious of function
On 2008-09-19, Brian Drain [EMAIL PROTECTED] wrote: What does the suspend command do? Assuming your shell is /bin/ksh, ksh(1) documents what the suspend command does. -- Greetings from Oostende (BE) -*- Danny Cautaert (DaCa) Write me in Dutch, French or English * GnuPG: 10731977 Meet me at OpenCON * 28-30 November 2008 * Venice (IT)
Re: suspend command - curious of function
Hi Brian, Brian Drain wrote on Fri, Sep 19, 2008 at 04:40:14PM -0500: What does the suspend command do? It's a shell command alias. Look out for the line suspend='kill -STOP $$' in ksh(1). I cannot find a man page on it, In OpenBSD, most shell builtins and shell command aliases do not have their own man page or man page symlink. Such symlinks should not be added: Many shells have similar builtins, so which shell's man page would you link? To see the problem, look at alias(1). No, the alias builtin is not csh(1)-specific, ksh(1) has an alias builtin, too. Also, some shell builtins have the same name and similar functionality as stand-alone commands, for example echo(1), test(1). There are exceptions to the rule. For example, cd(1) is a shell builtin, but not a stand-alone command. On the other hand, not having symlinks for builtins makes it a bit harder to find manual information about them. But that's less annoying than a large number of symlinks, pointing mostly at the man page of the shell you are _not_ using. Thus, whenever you discover some unknown command (for example, suspend), try the following commands: $ apropos suspend # see man(1) $ which suspend# see which(1) $ alias suspend# see ksh(1) alias builtin $ man ksh # or whatever shell you are using Search the shell man page in order to find out whether it's a shell builtin or a default shell command alias. I type suspend at the cmd line, it drops me past the command line. Can't ^C or ^Z or anything out of it. Does it have a purpose? Try this: [EMAIL PROTECTED] $ echo $$ 22151 [EMAIL PROTECTED] $ sudo -i [EMAIL PROTECTED] # echo $$ 32319 [EMAIL PROTECTED] # suspend [1] + Suspended (signal) sudo -i [EMAIL PROTECTED] $ echo $$ 22151 [EMAIL PROTECTED] $ exit You have stopped jobs [EMAIL PROTECTED] $ fg %1 sudo -i [EMAIL PROTECTED] # echo $$ 32319 [EMAIL PROTECTED] # exit [EMAIL PROTECTED] $ echo $$ 22151 [EMAIL PROTECTED] $ exit Yours, Ingo
Re: suspend command - curious of function
2008/9/20 Ingo Schwarze [EMAIL PROTECTED]: In OpenBSD, most shell builtins and shell command aliases do not have their own man page or man page symlink. Such symlinks should not be added: Many shells have similar builtins, so which shell's man page would you link? Would it be useful to have man pages for built-ins, but make those man pages disambiguation pages that explain that the command in question is a shell built-in command, and how to find the relevant info on the respective shell's main man page? Another idea would be to make man look at $SHELL and serve up a relevant man page on that basis. This would require adding that logic to man though. regards, --ropers
Re: suspend command - curious of function
On Fri, Sep 19, 2008 at 11:51:45PM +, ropers wrote: 2008/9/20 Ingo Schwarze [EMAIL PROTECTED]: In OpenBSD, most shell builtins and shell command aliases do not have their own man page or man page symlink. Such symlinks should not be added: Many shells have similar builtins, so which shell's man page would you link? Would it be useful to have man pages for built-ins, but make those man pages disambiguation pages that explain that the command in question is a shell built-in command, and how to find the relevant info on the respective shell's main man page? Another idea would be to make man look at $SHELL and serve up a relevant man page on that basis. This would require adding that logic to man though. regards, --ropers originally, we did have MLINKS for some shell builtins, and i think they pointed to ksh(1) (may have been csh(1) though, i can;t remember). anyway, the situation was unsatisfactory because not everyone uses ksh (or csh) and secondly have a look at how many builtins are listed in ksh. quite a few, and not all of them exist on other shells. a separate man page per builtin would be nuts. using MLINKS is unworkable. the only think i thought possible was a man page which said this is a builtin, see your shell man page and MLINK to it. but that's crazy too. just read your shell's man page. jmc