Sponsored Content
Operating Systems Solaris Missing init files for zsh and bash Post 302071511 by maag on Friday 21st of April 2006 08:12:06 AM
Old 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

From bash to csh and zsh

... 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

How to I change init levels after typing init 1

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

init-script failing because of /etc/rc.d/init.d/functions

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

Bash script - im missing something and cant's figure out what

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

Find missing string with bash

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

a simple for loop in bash and zsh

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

Init scripts missing . . .

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

Device-mapper behaviour booting on init=bin/bash

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

Run bash command inside zsh script

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)

MacOS 10.15 (Catalina) switches from bash to zsh

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
ZSH(1)							      General Commands Manual							    ZSH(1)

NAME
zsh - the Z shell SYNOPSIS
Because zsh contains many features, the zsh manual has been split into a number of sections: zsh Zsh overview (this section) zshmisc Anything not fitting into the other sections zshexpn Zsh command and parameter expansion zshparam Zsh parameters zshoptions Zsh options zshbuiltins Zsh built-in functions zshzle Zsh command line editing zshcompwid Zsh completion widgets zshcompsys Zsh completion system zshcompctl Zsh completion control zshmodules Zsh loadable modules zshzftpsys Zsh built-in FTP client zshall Meta-man page containing all of the above DESCRIPTION
Zsh is a UNIX command interpreter (shell) usable as an interactive login shell and as a shell script command processor. Of the standard shells, zsh most closely resembles ksh but includes many enhancements. Zsh has command line editing, builtin spelling correction, program- mable command completion, shell functions (with autoloading), a history mechanism, and a host of other features. AUTHOR
Zsh was originally written by Paul Falstad <pf@zsh.org>. Zsh is now maintained by the members of the zsh-workers mailing list <zsh-work- ers@sunsite.dk>. The development is currently coordinated by Peter Stephenson <pws@zsh.org>. The coordinator can be contacted at <coordi- nator@zsh.org>, but matters relating to the code should generally go to the mailing list. AVAILABILITY
Zsh is available from the following anonymous FTP sites. These mirror sites are kept frequently up to date. The sites marked with (H) may be mirroring ftp.cs.elte.hu instead of the primary site. Primary site ftp://ftp.zsh.org/pub/zsh/ http://www.zsh.org/pub/zsh/ Australia ftp://ftp.zsh.org/pub/zsh/ http://www.zsh.org/pub/zsh/ ftp://ftp.ips.gov.au/pub/packages/zsh/ (H) Denmark ftp://sunsite.dk/pub/unix/shells/zsh/ Finland ftp://ftp.funet.fi/pub/unix/shells/zsh/ France ftp://ftp.cenatls.cena.dgac.fr/shells/zsh/ Germany ftp://ftp.fu-berlin.de/pub/unix/shells/zsh/ (H) ftp://ftp.gmd.de/packages/zsh/ ftp://ftp.uni-trier.de/pub/unix/shell/zsh/ Hungary ftp://ftp.cs.elte.hu/pub/zsh/ http://www.cs.elte.hu/pub/zsh/ ftp://ftp.kfki.hu/pub/packages/zsh/ Israel ftp://ftp.math.technion.ac.il/pub/zsh/ http://www.math.technion.ac.il/pub/zsh/ Italy ftp://ftp.unina.it/pub/Unix/pkgs/shell/zsh/ Japan ftp://ftp.nisiq.net/pub/shells/zsh/ (H) ftp://ftp.win.ne.jp/pub/shell/zsh/ Norway ftp://ftp.uit.no/pub/unix/shells/zsh/ Poland ftp://sunsite.icm.edu.pl/pub/unix/shells/zsh/ Romania ftp://ftp.roedu.net/pub/mirrors/ftp.zsh.org/pub/zsh/ ftp://ftp.kappa.ro/pub/mirrors/ftp.zsh.org/pub/zsh/ Slovenia ftp://ftp.siol.net/mirrors/zsh/ Sweden ftp://ftp.lysator.liu.se/pub/unix/zsh/ UK ftp://ftp.net.lut.ac.uk/zsh/ ftp://sunsite.org.uk/packages/zsh/ USA ftp://uiarchive.uiuc.edu/pub/packages/shells/zsh/ ftp://ftp.rge.com/pub/shells/zsh/ ftp://foad.org/pub/zsh/ http://foad.org/zsh/ MAILING LISTS
Zsh has 3 mailing lists: <zsh-announce@sunsite.dk> Announcements about releases, major changes in the shell and the monthly posting of the Zsh FAQ. (moderated) <zsh-users@sunsite.dk> User discussions. <zsh-workers@sunsite.dk> Hacking, development, bug reports and patches. To subscribe or unsubscribe, send mail to the associated administrative address for the mailing list. <zsh-announce-subscribe@sunsite.dk> <zsh-users-subscribe@sunsite.dk> <zsh-workers-subscribe@sunsite.dk> <zsh-announce-unsubscribe@sunsite.dk> <zsh-users-unsubscribe@sunsite.dk> <zsh-workers-unsubscribe@sunsite.dk> YOU ONLY NEED TO JOIN ONE OF THE MAILING LISTS AS THEY ARE NESTED. All submissions to zsh-announce are automatically forwarded to zsh-users. All submissions to zsh-users are automatically forwarded to zsh-workers. If you have problems subscribing/unsubscribing to any of the mailing lists, send mail to <listmaster@zsh.org>. The mailing lists are main- tained by Karsten Thygesen <karthy@kom.auc.dk>. The mailing lists are archived; the archives can be accessed via the administrative addresses listed above. There is also a hypertext ar- chive, maintained by Geoff Wing <gcw@zsh.org>, available at http://www.zsh.org/mla/. THE ZSH FAQ
Zsh has a list of Frequently Asked Questions (FAQ), maintained by Peter Stephenson <pws@zsh.org>. It is regularly posted to the newsgroup comp.unix.shell and the zsh-announce mailing list. The latest version can be found at any of the Zsh FTP sites, or at http://www.zsh.org/FAQ/. The contact address for FAQ-related matters is <faqmaster@zsh.org>. THE ZSH WEB PAGE
Zsh has a web page which is located at http://www.zsh.org/. This is maintained by Karsten Thygesen <karthy@zsh.org>, of SunSITE Denmark. The contact address for web-related matters is <webmaster@zsh.org>. THE ZSH USERGUIDE
A userguide is currently in preparation. It is intended to complement the manual, with explanations and hints on issues where the manual can be cabbalistic, hierographic, or downright mystifying (for example, the word `hierographic' does not exist). It can be viewed in its current state at http://zsh.sunsite.dk/Guide/. At the time of writing, chapters dealing with startup files and their contents and the new completion system were essentially complete. INVOCATION OPTIONS
The following flags are interpreted by the shell when invoked to determine where the shell will read commands from: -c Take the first argument as a command to execute, rather than reading commands from a script or standard input. If any further argu- ments are given, the first one is assigned to $0, rather than being used as a positional parameter. -i Force shell to be interactive. -s Force shell to read commands from the standard input. If the -s flag is not present and an argument is given, the first argument is taken to be the pathname of a script to execute. After the first one or two arguments have been appropriated as described above, the remaining arguments are assigned to the positional parameters. For further options, which are common to invocation and the set builtin, see zshoptions(1). Options may be specified by name using the -o option. -o acts like a single-letter option, but takes a following string as the option name. For example, zsh -x -o shwordsplit scr runs the script scr, setting the XTRACE option by the corresponding letter `-x' and the SH_WORD_SPLIT option by name. Options may be turned off by name by using +o instead of -o. -o can be stacked up with preceding single-letter options, so for example `-xo shwordsplit' or `-xoshwordsplit' is equivalent to `-x -o shwordsplit'. Options may also be specified by name in GNU long option style, `--option-name'. When this is done, `-' characters in the option name are permitted: they are translated into `_', and thus ignored. So, for example, `zsh --sh-word-split' invokes zsh with the SH_WORD_SPLIT option turned on. Like other option syntaxes, options can be turned off by replacing the initial `-' with a `+'; thus `+-sh-word-split' is equivalent to `--no-sh-word-split'. Unlike other option syntaxes, GNU-style long options cannot be stacked with any other options, so for example `-x-shwordsplit' is an error, rather than being treated like `-x --shwordsplit'. The special GNU-style option `--version' is handled; it sends to standard output the shell's version information, then exits successfully. `--help' is also handled; it sends to standard output a list of options that can be used when invoking the shell, then exits successfully. Option processing may be finished, allowing following arguments that start with `-' or `+' to be treated as normal arguments, in two ways. Firstly, a lone `-' (or `+') as an argument by itself ends option processing. Secondly, a special option `--' (or `+-'), which may be specified on its own (which is the standard POSIX usage) or may be stacked with preceding options (so `-x-' is equivalent to `-x --'). Options are not permitted to be stacked after `--' (so `-x-f' is an error), but note the GNU-style option form discussed above, where `--shwordsplit' is permitted and does not end option processing. Except when the sh/ksh emulation single-letter options are in effect, the option `-b' (or `+b') ends option processing. `-b' is like `--', except that further single-letter options can be stacked after the `-b' and will take effect as normal. COMPATIBILITY
Zsh tries to emulate sh or ksh when it is invoked as sh or ksh respectively; more precisely, it looks at the first letter of the name by which it was invoked, excluding any initial `r' (assumed to stand for `restricted'), and if that is `s' or `k' it will emulate sh or ksh. Furthermore, if invoked as su (which happens on certain systems when the shell is executed by the su command), the shell will try to find an alternative name from the SHELL environment variable and perform emulation based on that. In sh and ksh compatibility modes the following parameters are not special and not initialized by the shell: ARGC, argv, cdpath, fignore, fpath, HISTCHARS, mailpath, MANPATH, manpath, path, prompt, PROMPT, PROMPT2, PROMPT3, PROMPT4, psvar, status, watch. The usual zsh startup/shutdown scripts are not executed. Login shells source /etc/profile followed by $HOME/.profile. If the ENV environ- ment variable is set on invocation, $ENV is sourced after the profile scripts. The value of ENV is subjected to parameter expansion, com- mand substitution, and arithmetic expansion before being interpreted as a pathname. Note that the PRIVILEGED option also affects the exe- cution of startup files. The following options are set if the shell is invoked as sh or ksh: NO_BAD_PATTERN, NO_BANG_HIST, NO_BG_NICE, NO_EQUALS, NO_FUNC- TION_ARGZERO, GLOB_SUBST, NO_GLOBAL_EXPORT, NO_HUP, INTERACTIVE_COMMENTS, KSH_ARRAYS, NO_MULTIOS, NO_NOMATCH, NO_NOTIFY, POSIX_BUILTINS, NO_PROMPT_PERCENT, RM_STAR_SILENT, SH_FILE_EXPANSION, SH_GLOB, SH_OPTION_LETTERS, SH_WORD_SPLIT. Additionally the BSD_ECHO and IGNORE_BRACES options are set if zsh is invoked as sh. Also, the KSH_OPTION_PRINT, LOCAL_OPTIONS, PROMPT_BANG, PROMPT_SUBST and SIN- GLE_LINE_ZLE options are set if zsh is invoked as ksh. RESTRICTED SHELL
When the basename of the command used to invoke zsh starts with the letter `r' or the `-r' command line option is supplied at invocation, the shell becomes restricted. Emulation mode is determined after stripping the letter `r' from the invocation name. The following are disabled in restricted mode: o changing directories with the cd builtin o changing or unsetting the PATH, path, MODULE_PATH, module_path, SHELL, HISTFILE, HISTSIZE, GID, EGID, UID, EUID, USERNAME, LD_LIBRARY_PATH, LD_AOUT_LIBRARY_PATH, LD_PRELOAD and LD_AOUT_PRELOAD parameters o specifying command names containing / o specifying command pathnames using hash o redirecting output to files o using the exec builtin command to replace the shell with another command o using jobs -Z to overwrite the shell process' argument and environment space o using the ARGV0 parameter to override argv[0] for external commands o turning off restricted mode with set +r or unsetopt RESTRICTED These restrictions are enforced after processing the startup files. The startup files should set up PATH to point to a directory of com- mands which can be safely invoked in the restricted environment. They may also add further restrictions by disabling selected builtins. Restricted mode can also be activated any time by setting the RESTRICTED option. This immediately enables all the restrictions described above even if the shell still has not processed all startup files. STARTUP
/SHUTDOWN FILES Commands are first read from /etc/zshenv; this cannot be overridden. Subsequent behaviour is modified by the RCS and GLOBAL_RCS options; the former affects all startup files, while the second only affects those in the /etc directory. If one of the options is unset at any point, any subsequent startup file(s) of the corresponding type will not be read. It is also possible for a file in $ZDOTDIR to re-enable GLOBAL_RCS. Both RCS and GLOBAL_RCS are set by default. Commands are then read from $ZDOTDIR/.zshenv. If the shell is a login shell, commands are read from /etc/zprofile and then $ZDOTDIR/.zpro- file. Then, if the shell is interactive, commands are read from /etc/zshrc and then $ZDOTDIR/.zshrc. Finally, if the shell is a login shell, /etc/zlogin and $ZDOTDIR/.zlogin are read. When a login shell exits, the files $ZDOTDIR/.zlogout and then /etc/zlogout are read. This happens with either an explicit exit via the exit or logout commands, or an implicit exit by reading end-of-file from the terminal. However, if the shell terminates due to exec'ing another process, the logout files are not read. These are also affected by the RCS and GLOBAL_RCS options. Note also that the RCS option affects the saving of history files, i.e. if RCS is unset when the shell exits, no history file will be saved. If ZDOTDIR is unset, HOME is used instead. Those files listed above as being in /etc may be in another directory, depending on the instal- lation. As /etc/zshenv is run for all instances of zsh, it is important that it be kept as small as possible. In particular, it is a good idea to put code that does not need to be run for every single shell behind a test of the form `if [[ -o rcs ]]; then ...' so that it will not be executed when zsh is invoked with the `-f' option. Any of these files may be pre-compiled with the zcompile builtin command (see zshbuiltins(1)). If a compiled file exists (named for the original file plus the .zwc extension) and it is newer than the original file, the compiled file will be used instead. FILES
$ZDOTDIR/.zshenv $ZDOTDIR/.zprofile $ZDOTDIR/.zshrc $ZDOTDIR/.zlogin $ZDOTDIR/.zlogout ${TMPPREFIX}* (default is /tmp/zsh*) /etc/zshenv /etc/zprofile /etc/zshrc /etc/zlogin /etc/zlogout (installation-specific - /etc is the default) SEE ALSO
sh(1), csh(1), tcsh(1), rc(1), bash(1), ksh(1), zshbuiltins(1), zshcompwid(1), zshcompsys(1), zshcompctl(1), zshexpn(1), zshmisc(1), zsh- modules(1), zshoptions(1), zshparam(1), zshzle(1) IEEE Standard for information Technology - Portable Operating System Interface (POSIX) - Part 2: Shell and Utilities, IEEE Inc, 1993, ISBN 1-55937-255-9. zsh 4.0.6 August 14, 2002 ZSH(1)
All times are GMT -4. The time now is 10:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy