Unix and Linux Discussions Tagged with bin |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
1 |
2,584 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
11,030 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
12,270 |
Programming |
|
|
|
6 |
5,319 |
Homework & Coursework Questions |
|
|
|
4 |
4,447 |
Shell Programming and Scripting |
|
|
|
1 |
2,419 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
6,037 |
Programming |
|
|
|
6 |
9,251 |
Programming |
|
|
|
4 |
7,535 |
Shell Programming and Scripting |
|
|
|
5 |
24,666 |
Shell Programming and Scripting |
|
|
|
1 |
3,640 |
Linux |
|
|
|
0 |
1,055 |
Software Releases - RSS News |
|
|
|
7 |
9,694 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
9,765 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,648 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
3,909 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
11,705 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
10,293 |
Shell Programming and Scripting |
|
|
|
7 |
50,259 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
11,356 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
22,033 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,357 |
Shell Programming and Scripting |
|
|
|
3 |
9,688 |
Shell Programming and Scripting |
|
|
|
1 |
6,365 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
40,591 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
14,554 |
Shell Programming and Scripting |
|
|
|
1 |
23,599 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
8,154 |
Shell Programming and Scripting |
|
|
|
6 |
9,709 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
12,249 |
UNIX for Dummies Questions & Answers |
|
|
|
9 |
15,254 |
Shell Programming and Scripting |
|
|
|
3 |
3,678 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
6,880 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,358 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,805 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
8,111 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
4,864 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
3,305 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,906 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,575 |
UNIX for Dummies Questions & Answers |
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/ksh93 /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/ksh93 /usr/bin/pfcsh
/usr/bin/pfksh /usr/bin/pfsh
/usr/bin/sh /usr/bin/tcsh
/usr/bin/zsh /usr/sfw/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.
NOTES
Restricted shells should not be listed in /etc/shells.
SunOS 5.11 1 Nov 2007 getusershell(3C)