Sponsored Content
Top Forums UNIX for Advanced & Expert Users All alias in .profile lost when "script" command is called Post 302263681 by buffoonix on Tuesday 2nd of December 2008 08:22:07 AM
Old 12-02-2008
Hi,

I would say the standard way was to remove all Bash alias and function definitions from your ~/.bash_profile or ~/.profile and instead put them in the file ~/.bahsrc (create that file if it doesn't yet exist).
Then to your account's ~/.profile or ~/.bash_profile add these lines:
Code:
BASH_ENV=$HOME/.bashrc
if [ -f $BASH_ENV ]; then
    . $BASH_ENV
    export BASH_ENV
else
    unset BASH_ENV
fi

Now you should have your alias defs available for each shell you spawn anew.
Refer to man bash for details.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Where can I read about the difference between "..profile" and ".profile"

Hi I know from reading O Riley's Classic Shell Scripting' that the .profile file is " the shells configuration file" but I am unable to find a reference to what "..profile" means. I have searched on the net, Sams Teach Yourself Unix, Unix Visual Quickstart Guide and Linux in a Nutshell. I have... (2 Replies)
Discussion started by: zorrokan
2 Replies

2. UNIX for Dummies Questions & Answers

Alias, function or script (bash) to "revert" cd command?

In all of my brief and superficial experience with Unix or Linux, the one curious and consistent thing has been that 'cd ./' (back up one directory level) has done absolutely nothing in any of them. Now I understand that, at least for bash, 'cd ./' appears to have been substituted by 'cd ..' Am... (1 Reply)
Discussion started by: SilversleevesX
1 Replies

3. Shell Programming and Scripting

Idea for an "informative" bash alias or script

I had the idea come into my head that it would be good to have a single command that gave file type, file size, last modification date, and owner/group information, like what one would see in a GUI "Properties" dialog, but all in a terminal window. In my opinion, these statistics about a file... (5 Replies)
Discussion started by: SilversleevesX
5 Replies

4. UNIX for Dummies Questions & Answers

Expect "interact" fails when called from another script

So, I have an expect script (let's call it expect.exp) that takes 3 arguments. It logs into a remote server, runs a set of commands, then hands control over to the user by the "interact" command. If I call this script from the command line, it works properly. Now I'd like to apply this script... (2 Replies)
Discussion started by: treesloth
2 Replies

5. UNIX for Dummies Questions & Answers

the meaning of "!:*" in "alias foo 'command\!:*' filename"

Hi: How can I remove my own post? Thanks. (2 Replies)
Discussion started by: phil518
2 Replies

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

7. UNIX for Dummies Questions & Answers

Problems with "exit" called from function in bourne script

Hi everyone. #!/sbin/sh EXITING() { umount /FOLDER rm -Rf /FOLDER echo "EXIT" exit 0 } EXITING echo "OK" (8 Replies)
Discussion started by: vacadepollo
8 Replies

8. Shell Programming and Scripting

Any way to "alias" file patterns for use in a command?

First, I apologize for my 'noobness' with Linux and the shell. I'm running Ubuntu with zsh as my shell. What I'd like to be able to do is clean up a messy Downloads folder by moving categories of files to different directories with something like: mv dir/$vids dest mv dir/$music dest mv... (5 Replies)
Discussion started by: Apollo33
5 Replies

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

10. 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
tuned.conf(5)						tuned.conf file format description					     tuned.conf(5)

NAME
tuned.conf - Tuned profile definition DESCRIPTION
This man page documents format of Tuned 2.0 profile definition files. Profile is stored in /etc/tuned/<profile_name>/tuned.conf or in /usr/lib/tuned/<profile_name>/tuned.conf file where the /etc/tuned/ directory has higher priority. The tuned.conf configures the profile and it is in ini-file format. MAIN SECTION
The main section is called "[main]" and can contain following options: include= Includes config file defined as value. Config file can be defined as full path or by the profile name to which it belongs. If this parameter is present, the histogram will be shown at the end of the measurement. PLUGINS
Every other section defines one plugin. The name of the section is used as name for the plugin and is used in logs to identify the plugin. There can be only one plugin of particular type tuning particular device. Conflicts are by default fixed by merging the options of both plugins together. This can be changed by "replace" option. Every plugin section can contain following sections: type= Plugin type. Currently there are following plugins: disk, script, net, cpu, eeepc_she. devices= Comma separated list of devices which should be tuned by this plugin instance. If you omit this option, all found devices will be tuned. replace=1 If there is conflict between two plugins (meaning two plugins of the same type are trying to configure the same devices), then the plugin defined as last replaces all options defined by the previosly defined plugin. Plugins can also have plugin related options. EXAMPLE
[main] # Includes plugins defined in "included" profile. include=included # Define my_sysctl plugin [my_sysctl] type=sysctl # This plugin will replace any sysctl plugin defined in "included" profile replace=1 # 256 KB default performs well experimentally. net.core.rmem_default = 262144 net.core.wmem_default = 262144 # Define my_script plugin # Both scripts (profile.sh from this profile and script from "included" # profile) will be run, because if there is no "replace=1" option the # default action is merge. [my_script] type=script script=profile.sh SEE ALSO
tuned(8) AUTHOR
Written by Jan Kaluza <jkaluza@redhat.com>. REPORTING BUGS
Report bugs to <jkaluza@redhat.com>. Jan Kaluza 13 Mar 2012 tuned.conf(5)
All times are GMT -4. The time now is 07:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy