Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google site



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-04-2006
Registered User
 

Join Date: Aug 2005
Posts: 9
How do I do ". set -o emacs" so it exists globally

I have . set -o emacs in my .profile because that's what I'm used to for retrieving commands etc... In my profile I also setup several different aixterms and want the . set -o emacs to apply to these new terminals as well. How do I go about doing this so I don't need to manually enter the command when I initially navigate to each window ?

Thanks !
Sponsored Links
  #2 (permalink)  
Old 10-07-2006
Registered User
 

Join Date: May 2006
Posts: 101
hi,
that depends on the shell you are using. first you need to understand how profiles are processed (that depends on the actuall shell read the man page)

.profile is normaly read by the login shell (what means once)
.bashrc is read every time a shell is started (until you told it to ignore .bashrc) this true for bash
if you are using ksh then use .kshrc using csh is different either.
  #3 (permalink)  
Old 10-09-2006
Registered User
 

Join Date: Aug 2005
Posts: 9
I am using the korn shell. So you are saying I need to put the . set -o emacs in my .kshrc ?
  #4 (permalink)  
Old 10-09-2006
BOFH BOFH is offline Forum Advisor  
Registered User
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 406
Typically .kshrc is not read upon login unless you source it in your .profile. .bashrc is sourced automatically. Just add the command to your .profile and it'll be started each time you log in no matter how many terminal windows you have.

This is true in AIX, Solaris and HP-UX. Some older versions of Red Hat seem to use .bashrc and others use .profile. I haven't pursued what the difference although I think newer versions are using .profile.

I edited my .bashrc in most of the Red Hat servers I administrated at the time, but a couple of new servers based on AS 4 I believe didn't read the .bashrc files and I had to set up a .profile to set my standard environment variables.

Carl
  #5 (permalink)  
Old 10-09-2006
Registered User
 

Join Date: Aug 2005
Posts: 9
I am on machine with AIX and I had it sourced in my .profile and that didn't seem to work. I added set -o emacs to my .kshrc and all is well now. Thanks for the response.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" Linux Bot UNIX and Linux RSS News 0 01-04-2008 03:00 PM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-20-2007 01:52 AM
why emacs caused "command not found" error cy163 UNIX for Dummies Questions & Answers 1 05-01-2007 05:17 PM
No utpmx entry: you must exec "login" from lowest level "shell" peterpan UNIX for Dummies Questions & Answers 0 01-18-2006 04:15 AM
Does "gzip" have a no prompt option on it for overwriting if file exists? LordJezo UNIX for Dummies Questions & Answers 1 07-29-2004 10:39 AM



All times are GMT -4. The time now is 04:57 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0