Sponsored Content
Full Discussion: Help
Operating Systems Linux Help Post 302086781 by BOFH on Sunday 27th of August 2006 04:28:52 PM
Old 08-27-2006
Quote:
Originally Posted by Irish Jimmy
I'm usin' /bin/bash:
I have a choice:

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
bin/tcsh

Which one should i use?
If you check in one of the main threads, everyone has a personal preference. /bin/sh was the first popular shell. Korn shell (ksh) is an enhanced version and Bourne Again Shell (bash) is even more enhanced.

On Solaris, you'll probably use Korn shell and on Linux you'll probably use Bourne Again shell.

Quote:
Ok "ls" worked, but ./ isn't.

Smilie
ls works because it's in your PATH (type which ls and it'll probably return /bin/ls). Unless you have a script called ls in your current directory, ./ls will not work. If you just type in "./", bash will just tell you that ./ is a directory.

If you type in ./[command], [command] has to be in the current directory. If you just type in [command], then [command] has to be in one of the directories identified by the PATH environment variable.

Carl
 
getusershell(3C)					   Standard C Library Functions 					  getusershell(3C)

NAME
getusershell, setusershell, endusershell - get legal user shells SYNOPSIS
#include <unistd.h> char *getusershell(void); void setusershell(void); void endusershell(void); DESCRIPTION
The getusershell() function returns a pointer to a legal user shell as defined by the system manager in the file /etc/shells. If /etc/shells does not exist, the following locations of the standard system shells are used in its place: /bin/bash /bin/csh /bin/jsh /bin/ksh /bin/pfcsh /bin/pfksh /bin/pfsh /bin/sh /bin/tcsh /bin/zsh /sbin/jsh /sbin/pfsh /sbin/sh /usr/bin/bash /usr/bin/csh /usr/bin/jsh /usr/bin/ksh /usr/bin/pfcsh /usr/bin/pfksh /usr/bin/pfsh /usr/bin/sh /usr/bin/tcsh /usr/bin/zsh /usr/xpg4/bin/sh The getusershell() function opens the file /etc/shells, if it exists, and returns the next entry in the list of shells. The setusershell() function rewinds the file or the list. The endusershell() function closes the file, frees any memory used by getusershell() and setusershell(), and rewinds the file /etc/shells. RETURN VALUES
The getusershell() function returns a null pointer on EOF. BUGS
All information is contained in memory that may be freed with a call to endusershell(), so it must be copied if it is to be saved. SunOS 5.10 30 Aug 2004 getusershell(3C)
All times are GMT -4. The time now is 10:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy