How do I do ". set -o emacs" so it exists globally


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How do I do ". set -o emacs" so it exists globally
# 1  
Old 10-04-2006
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 !
# 2  
Old 10-07-2006
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  
Old 10-09-2006
I am using the korn shell. So you are saying I need to put the . set -o emacs in my .kshrc ?
# 4  
Old 10-09-2006
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  
Old 10-09-2006
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Shell Programming and Scripting

Why awk print is strange when I set FS = " " instead of FS = "\t"?

Look at the following data file(cou.data) which has four fields separated by tab. Four fields are country name, land area, population, continent where it belongs. As for country name or continent name which has two words, two words are separated by space. (Data are not accurately... (1 Reply)
Discussion started by: chihuyu
1 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. UNIX for Dummies Questions & Answers

Scripts exists but crontab says "File not found"

Hi All, We have an archiving script on our applications box. It is scheduled to run at 36th minute every hour. 36 * * * * /archive_7.sh But it throws an error saying "sh: /archive_7.sh: not found". I am not able to understand why. # ls -l /archive_7.sh ; file /archive_7.sh -rwxr-xr-x ... (4 Replies)
Discussion started by: satish51392111
4 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

7. UNIX for Dummies Questions & Answers

why emacs caused "command not found" error

I installed Red Hat Enterprise Linux 5 on my PC. When i typed 'emacs' on the console, "command not found" error occurrd. Why. :mad: (1 Reply)
Discussion started by: cy163
1 Replies

8. Programming

Differece between "env" and "set" command

Hi, Please clarify what is the difference between "env" and "set" command. I guess set will display the system variables and user defined variables. Thanks Sweta (1 Reply)
Discussion started by: sweta
1 Replies

9. Shell Programming and Scripting

Problem with "set" and "awk"

Hi, i'm programming on /bin/csh and i need to get the number extracted by this: set ppl_kn = $(awk '{ field = $6 } ; END{ print field }' < ppl_LM_kn.ppl ) and the output is: "Illegal variable name." Please anyone can help me what's wrong? Thanks in advance (2 Replies)
Discussion started by: tmxps
2 Replies

10. UNIX for Dummies Questions & Answers

Does "gzip" have a no prompt option on it for overwriting if file exists?

So I dont enounter things like: gzip: /sometimename.gz already exists; do you wish to overwrite (y or n)? Want to add it into a script and if there is a file aready there to just overwrite it, otherwise the script will hang unless there is manual intervention. (1 Reply)
Discussion started by: LordJezo
1 Replies
Login or Register to Ask a Question