Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: Setting up aliases outside .bashrc

Arne Schmitz wrote:
> houghi schrieb:
>> Just wondering. The second (my) solution is already standard in .bashrc.
>> The first solution is not. How is the second solution easier then the
>> first. With the second, the only thing you have to do is add .alias in
>> your homedirectory.
> True. I thought he might want also do some other things that do only work
> with sourcing.

Sure. The only difference as far as I can see) is that the standard puts
a test in front of it. Not a bad idea. I did it in another script like:

if [ -e "/etc/radiostreamrc" ]
        . /etc/radiostreamrc
if [ -e ~/.radiostreamrc ]
        . ~/.radiostreamrc
if [  "$OK" != "OK" ]
<snip making a file ~/.radiostreamrc>

What it does is first make /etc/radiostreamrc the default. Next it makes
~/.radiostreamrc the default, overwriting the first one. And if non of
these two are availbel, it makes a new one.

Later you can just edit ~/.radiostreamrc. No need to download two files.

It might be a bit complicated in scripting, but it works. The complete
source is here:
http://houghi.org/script/radiostream.sh and you need zenity installed as

I also use `. ~/.passwords` in scripts. That way I put my passwords in
there, chmod it to 600 and I can still share scripts easily without
being afraid of sharing my passwords.

It looks like:

# Different passwords. Chmod to 600

In a script I then just use:
. ~/.passwords
echo $IP_login $IP_password

There probably are more secure ways to do this.
houghi						      http://houghi.org
All my postings should  be read as if each line has a smiley behind it,
unless indicated  otherwise, including the signature.

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index