Ubuntu :: Create Some Aliases For Bash Shell?

Jun 14, 2010

I would like to create some aliases for bash shell. On other Unix/Linux machines I have done this using the alias command like this: alias rm rm -i

When I type that into a terminal on Ubuntu, it looks like alias is not installed. I get this:

bash: alias: rm: not found
bash: alias: rm: not found
bash: alias: -i: not found

I tried adding the alias to .bashrc instead, but then I get the same error message every time I start terminal. Just for fun I tried apt-get install alias, just to see what would happen, and it installed something called libperl-alias instead, and alias still doesn't work.

View 2 Replies


ADVERTISEMENT

Fedora :: Create A Shell Script File With Two Functions - Bash Scripting & /etc/bashrc

Oct 6, 2010

how come I can create a shell script file with two functions, I can execute the file, but when running declare -f, the functions are not on memory, and when invoking the function bash returns invalid. In the other hand, I can copy & paste the two functions at the end of my /etc/bashrc file.... then I can called the function by name.... and the commands within that function run on my session. here is a print of all my bash packets:

[Code]....

Does Fedora has restrictions on shell scripting? I haven't touch bash in seven years, so if things have change on it I'm behind on it, and sorry for my ignorance.

View 1 Replies View Related

Ubuntu :: Bash Set Aliases Not Staying?

Feb 23, 2010

If I set an alias in the terminal it stays.

Code:
alias echo="echo whoaoaaoaoaoaoaoa"

But...if I write a bash script with the identical command and execute it...

Code:
./setalias
echo

I get nothing... How do I fix this?

View 9 Replies View Related

Ubuntu :: How To Activate Bash Aliases In Lucid

May 16, 2010

So I checked the /etc/bash.bashrc file and it doesn't have the
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

I expected it to. So I checked the The /usr/share/base-files, and there it is. Problem is, it isn't part of the system wide bash, or is it? How do I activate the bash_aliases in Lucid Lynx?
Quick un-related question. Is ./ = /.??

View 2 Replies View Related

Ubuntu Servers :: How Can I Create E-mail Aliases

Feb 16, 2011

I installed postfix on my ubuntu server.I have created some users.How can I create e-mail aliases?For example, I have a user named "light" and I want to create for him an e-mail address.

View 3 Replies View Related

OpenSUSE :: Bash Aliases For Root - Where They Are Defined

Sep 26, 2010

Output of my #alias command looks just as normal as one would expect:
Code:
alias +='pushd .'
alias -='popd'
alias ..='cd ..'
alias ...='cd ../..' .....

And still whenever I (as root) type in bash
#ll
which would be short for
#ls- l
i get output of the command
#ls -al

So where aliases for root overwritten? Usually I would expect .bashrc in the /root directory. Or at least .alias file. But there none of those in my current /root. So, my question is where root user gets it's aliases from? This concerns only root user. Normal user has .bashrc and I made up my own aliases in .alias and that's works jut fine. And yes I could make .bashrc file in the /root and .aliases where I would define my own things.

View 4 Replies View Related

General :: Bash Aliases Lost Within Tmux

Jul 8, 2011

I just noticed that my .bashrc aliases (eg. alias www='cd ~/data/public_html') don't work from within tmux. They work fine from screen, though.

I don't think I've got anything special in ~/tmux.conf

Code:
# C-a just like in screen
unbind C-b
set -g prefix C-a

[Code].....

View 3 Replies View Related

Server :: Create New /etc/aliases For Postfix?

Jun 2, 2011

I have /var on it's own partition. Should i direct mail, in /etc/alises, sent to root to my normal local user or will /var end up getting filled up with mail, if i do that?Also:I went on the forums for dynDNS.com, explaining that i was setting up a network that includes a web server and a mail server. They rightly pointed out that i only needed to set up a DNS A record for webserver.dyndns.org. The mail server would be located by this DNS A record, as both machines share the same external I.P address(the external I.P of my ADSL router). So my mail addresses could be me@webserver.dyndns.org. So both machines would be reachable with the same DNS A record, and port-forwarding on my ADSL router would determine which host got which requests. That's what they said i should do for my scenario.
Bearing this in mind what should the values of $myhostname, $mydomain, $mydestination and $myorigin be?

My current thoughts, on the simplest way to do this, are:If $myhostname is mailserver.webserver.dyndns.org, then $myorigin can be webserver.dyndns.org, then $mydomain is webserver.dyndns.org and $mydestination has it's DEFAULT setting(mydestination = $myhostname localhost.$mydomain localhost).This the simplest workable approach right?, if not what are the best values for these parameters?.Also I have /var on it's own partition. Should i direct mail, in /etc/alises, sent to root to my normal local user or will /var end up getting filled up with mail, if i do that?

View 1 Replies View Related

General :: Create Aliases With Echoing Text Into The Variable?

Apr 29, 2011

For example if you want to create an alias in Linux with a message echoed into the variable would the following command be; alias hello="(echo)"Hello." "? I'm trying to learn some environment variables and aliases.

View 4 Replies View Related

Software :: Create Aliases And Virtual Table In Postfix?

May 26, 2010

I'm using rhel5 i configured postfix on it. need is to create virtual table and virtual.db. How can i create these

View 1 Replies View Related

Software :: Aliases - Using /etc/aliases - Does Not Get Routed To My Email

Apr 1, 2009

I am able to send a mail message to myself from a server without any problem...

But after I have updated /etc/aliases and added the line for all of root's mail to be routed to me....

Added:
root: myemail@company.com

and ran newaliases to implement it....

If I send a mail message to root, it does not get routed to my email...

View 3 Replies View Related

Fedora :: Stuck With Bash Shell / Changing Default Shell To Tcsh?

Mar 14, 2010

I want to change my default shell to tcsh. I used

Code:
usermod -s /bin/tcsh username
command as given at url

But if I open a new shell, it is still a bash shell.

How do I make my default shell as tcsh?

View 6 Replies View Related

Programming :: Bash-shell-like Less Functionality In The Python Shell?

Jun 25, 2010

Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?

Example:

Code:

>>> import subprocess
>>> help(subprocess)
...
[pages of stuff to read]
...

I'm hoping so as I hate scrolling and love how less works with simple keystrokes for page-up/page-down/searching etc.

View 4 Replies View Related

Programming :: Shell Scripting / Create A Shell Script Similar To Ls?

Jun 5, 2011

I am trying to create a shell script similar to ls, but which only lists directories. I have the first half working (no argument version), but trying to make it accept an argument, I am failing. My logic is sound I think, but I'm missing something on the syntax.

Code:
if [ $# -eq 0 ] ; then
d=`pwd`
for i in * ; do
if test -d $d/$i ; then
echo "$i:"
code....

View 10 Replies View Related

Ubuntu :: Create A Bash Script To Create Make A Ftp Mirror Copy Of It

Aug 4, 2011

I recently bought an host to have a personal website and would like to create a bash script to create make a mirror copy of it and then add it to crontab to run once a week. Essentially what I want to do is to get the website by using wget -m ftp://user***@ftp.host/mydir

Once this is done I'd like to have everything in an archive called mysite.date.tar.7z I've no experience at all of bash scripting but I guess this should be an easy task? How to make the user and password not visible ? Is there any other option better than wget? (maybe rsync it works better?)

View 2 Replies View Related

Ubuntu :: Does It Use Bash Or Some Other Shell

Sep 16, 2010

Does it use Bash or some other shell?

View 2 Replies View Related

Ubuntu Networking :: WARNING: $SHELL Not Set To Bash

Jan 2, 2010

Code:

terminator557@Dissimulo:~/ieee80211-1.2.18$ sudo make INC=/path/to/kernel-headers/include/
Makefile:17:
Makefile:18: WARNING: $SHELL not set to bash.
Makefile:19: If you experience build errors, try
Makefile:20: 'make SHELL=/bin/bash'.

[code].....

View 4 Replies View Related

Ubuntu :: Bash Shell Implements Version Of The Command?

Mar 19, 2011

I'm used to being able to put a script in ~/bin and having it overrule the system version of a command. However for "time" or "kill" since the bash shell implements a version of the command (i.e. /bin/ version is not used) doing this is not enough. How can I get the shell to run my own version instead of the version in the shell.I understand the implications of doing this. I know what I'm doing, I can always /bin/whatever if I want to get the old version (or just chmod -x ~/bin/whatever).

View 6 Replies View Related

General :: How To Use Foreach In Bash Shell

Mar 25, 2010

I used c-shell previously in unix. One of the useful command I used frequently is foreach.> foreach a (`cat list`)>> echo $a need to use bash shell now instead, and realized that I can't use foreach anymore. The command is not found. Does anyone knows if there is similar command / function in bash shell?

View 9 Replies View Related

General :: Use Bash Shell When I Run A Program From It?

May 11, 2011

So I open firefox from my bash shell with:

Code:
firefox google.ca
it opens firefox, I can browse, etc.
Now if I alt-tab back into my shell, i can't enter any commands in the shell.

I know that i can do this if I close firefox, but I want to keep working in my shell with firefox still open.

Is this possible?

View 6 Replies View Related

Software :: Get The 'bash' Or 'csh' Shell From Within Gvim?

Apr 8, 2010

I use ":!shell_command<enter>" OR ":sh<enter>" in gvim to execute shell commands or to get a shell. But I am getting an 'sh' shell. Is there a way to get the 'bash' or 'csh' shell from within gvim?

View 1 Replies View Related

Software :: IDE For Bash / Shell Programming

Mar 24, 2010

I just wanna ask if there's a ide for bash/shell programming?

View 2 Replies View Related

Programming :: Three Scripts - Using Bash As Shell

Feb 9, 2010

I am looking for three scripts (using bash as shell): to print out a list only with directories (no files) that they are found in running directory (no in subdirectories) to print out a list only with files (no directories) that they are bigger than 10Kb and are found in running directory (and in subdirectories) to print in the screen the lines of file with accidental order.

View 13 Replies View Related

CentOS 5 :: Bash Shell Corrupt

Feb 1, 2011

I just needed some help with running the bash shell. I think I might have accidentally corrupted a file when I was looking through the /bin dir. Anyways, whenever I login to my server via SSH I get the following output:

View 1 Replies View Related

Ubuntu :: Access MySQL-Workbench From Desktop Without Having To Tie Up My Bash Shell?

Aug 3, 2011

I just downloaded MySQL-Workbench and I see it in the folder: Code: /usr/bin how do I access it from my desktop without having to tie up my bash shell because the only way I can get to it right now is

Code:
cd /usr/bin
mysql-workbench

and only when I close the program can I use my bash for anything else.

View 7 Replies View Related

Ubuntu :: Create Launcher For A Shell Script?

Apr 4, 2010

I decided to try and find a home inventory application. I found one called "Attic Manager" that works in Ubuntu. [URL]

The instructions are to run it from the terminal. That's ok for once and a while, but a pain if used regularly. So I tried to set up a launcher for it. I couldn't seem to get it to work. In the command, I simply put in the path and file name, but can't seem to get it to work.

View 3 Replies View Related

Debian :: Creating A Bash-shell Script

Dec 1, 2015

how to do in Debian

1. am required to create a bash-shell script called terminator that terminates all processes of a name given to the shell script as an argument. Make sure the terminator shell script will not take any crucial file system services as arguments.

2. Show how you would configure an Ethernet card by reapplying your existing IP and network mask

3. Install a workable nfs file sharing system between your system and a remote system, using optimum values for resize and wsize.To demonstrate send a 512Mb block of random data between client and server using the dd command.Write down the relevant steps and procedures

View 6 Replies View Related

Fedora Installation :: Use Tcshell Instead Of Bash Shell?

Nov 24, 2009

how to install and use tcshell instead of bash shell...

I run this command but it still dosent work

# yum install tcsh

after installing I use this command to setting it as a default login

$ which csh

but it not work yet...

View 5 Replies View Related

OpenSUSE :: Gnome Terminal: How To Get The Bash Shell

Mar 17, 2010

i've finally got a NIX environment...yipee! Installed opensuse 11.2 in a dual boot with windoze with no problem whatsoever. unfortunately, my NIX skills are sadly dated or maybe things have changed or both. in any case, i have a rather trivial problem that i have not been able to figure out.

i go to gnome terminal to get to the bash shell, no problem except when i do things like cat, less and so on. the commands do what they do then when done the last line output is "some text" and "(END)" - at the completion of the command it does not return to the bash shell. i've tried ctrl-everything, enter, escape, actually all keystrokes i can think of to get back to the bash shell...no luck. man and docs have not been helpful or i simply missed the answer (i'm a little saturated at this point).the only thing i've been able to do to solve my dilema is close the terminal an start a new instance, not elegant but works.

View 8 Replies View Related

OpenSUSE :: Customizing A Bash Shell Prompt (PS1)?

Jul 28, 2010

I changed the default SUSE prompt setting by modifying the shell variable PS1 to display the following information:

u : the username of the current user
h : the hostname up to the first '.'
w : the current working directory, with $HOME abbreviated with a tilde

I used export command to setup a new shell prompt:

export PS1="[u@h: w]$ " To add colors to the shell prompt and make a regular user prompt blue I used the following command syntax:export PS1="e[0;34m[u@h: w]$ e[m "

[Code]...

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved