04-21-2006
Missing init files for zsh and bash
I change my default shell to zsh but can't find the init files, .zshrc and .zlogin from /export/home and /home. The other shells init files are there:.cshrc, .profile and .login. Am I suppose to use these as templates?
Also, bash_history is there but not zsh_history although zsh do keep a history. My zsh PATH is also unique which means there is a current file somewhere but where? Thanks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
... Am I glad to find this forum (and vBulletin too, nice!)..
OK, here's my issue. I have been handballed a bash script, not pretty but functional. I need to change to csh and zsh. For the csh I have the basics (e.g., such as change if/fi to if/endif, quote the variables, and bracket commands).... (10 Replies)
Discussion started by: lev_lafayette
10 Replies
2. Linux
Dear all,
I typed in init 1 on my redhat box as root and according to wikipedia (http://en.wikipedia.org/wiki/Runlevel):
1 Single-User Mode Does not configure network interfaces, start daemons, or allow non-root logins
So now I can't connect back to it. How do I change the init back to 3?... (8 Replies)
Discussion started by: z1dane
8 Replies
3. Red Hat
I encountered a problem on one of our database servers.
OS: CentOS 5.5 final
Kernel: 2.6.18-238.5.1.el5.028stab085.2 (OpenVZ kernel)
We wrote some DB-Start/Stop-scripts ("/db2/admin/scripts_dba/start_services.ksh" and ".../stop_services.ksh") to start the database instances. (Database... (1 Reply)
Discussion started by: bakunin
1 Replies
4. Shell Programming and Scripting
I just put together a script for work that will essentially automate the migration of our Windows fileserver to my newly created Debian based SAMBA server.
My script will create the necessary directories then copy the data over to my new server, after that it will set the ACL's by using... (3 Replies)
Discussion started by: binary-ninja
3 Replies
5. Shell Programming and Scripting
If I have a file called file A with a list of filenames. How do I find all the filenames in file A that aren't contained in file B?
I want to use bash scripting. (2 Replies)
Discussion started by: locoroco
2 Replies
6. Shell Programming and Scripting
Hi! I am just starting to learn scripting.
I am trying a simple script in bash and zsh
I have two questions:
First: Why zsh does not expand the var M? What I am doing wrong?
localhost galanom # bash -c 'M="m1 m2 m3 m4 m5"; for x in $M; do echo "<$x>"; done'
<m1>
<m2>
<m3>
<m4>
<m5>... (1 Reply)
Discussion started by: galanom
1 Replies
7. UNIX for Dummies Questions & Answers
One of our VM machines mysteriously went read-only overnight and as it wasn't being used, thought it would be a good idea to reboot the machine and run fsck on boot, well. . . .. things didn't quite work out that way lol :)
Anyway, the machine booted up, but mysteriously had no hostname set,... (2 Replies)
Discussion started by: jimbob01
2 Replies
8. Red Hat
Good morning
Recently we needed to change the password from a redhat 6.5 system that no one knew the root password.
Starting the system with the init=/bin/bash method took us to the following scenario:
system_vg active with only root_lv and tmpfs mounted.
our entries at fstab are like... (1 Reply)
Discussion started by: Ikaro0
1 Replies
9. Shell Programming and Scripting
Hi,
I would like to run following code in bash inside a zsh script. (In this case is output unfortunately very different if you run it in zsh).
I tried to put "bash" in front of the code but I obtained following error message "bash: do: No such file or directory
" eve though I merged the whole... (7 Replies)
Discussion started by: kamcamonty
7 Replies
10. OS X (Apple)
Interestingly Apple has decided to switch the default shell for new users from bash to zsh in MacOS Catalina (10.15)
Use zsh as the default shell on your Mac - Apple Support
Another interesting fact is that Catalina also comes with /bin/dash (5 Replies)
Discussion started by: Scrutinizer
5 Replies
LEARN ABOUT OPENSOLARIS
endusershell
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)