This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to get help for a bash command


CRETEL Dominique schrieb:
> 
> Hi all,
> 
> Does someone know how to get help for a bash command?
> 
> For example:
> 
>     man find <Enter>
> 
> or
> 
>     help du <Enter>

internal Commands of bash - that are commands hardcoded from within bash
- do have a short documentation via help, eg. "help test". Every
command, that is not bash internal should have it's own manual page -
"man bash", "man du"... The manual pages use to bear more information,
so I prefer to use "man bash" even for the internal commands.

> 
> Also, I want to know what is the "set -x" command in a shell script?
...

"set -x" makes the shell write every line that is executed to stderr, so
you can trace the execution of Your script. It is the same as if You
call "sh -x script-name".

> First, is there any body who can tell me where I can find the like-unix
> command "more"?

Try to use less instead. It's eg. on the german gnuwin mirror
ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin32/porters/Hirmke_Michael/less-321-win32-bin.tar.gz
... And don't forget to read the README :-). Maybe this needs ncurses
too...

Another way is to make a function that emulates the more command:
function more() {
  case "$1" in
  ""|"-") /WINNT/system32/more.com ;;
  *)      /WINNT/system32/more.com < "$@" ;;
  esac
}

-- 
	Matthias Morche (mailto:morche@sat1.de)
		SAT.1 (http://www.sat1.de)

>>> Linux: the greatest adventure game since the invention of the PC <<<
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]