Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Application Discovery Thread [formerly: app that does this?]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5 ... 15, 16, 17  Next  
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Sun Oct 12, 2003 7:16 am    Post subject: Reply with quote

My avatar doesn't depict our nearby flaming ball of fusing hydrogen for nothing :wink:
Back to top
View user's profile Send private message
haceye
Apprentice
Apprentice


Joined: 22 May 2003
Posts: 187
Location: Stuttgart, Germany

PostPosted: Mon Oct 13, 2003 12:41 pm    Post subject: Reply with quote

Hi,

I hate typing /etc/init.d/... over and over, so I added this to my /root/.bashrc:

Code:
for service in `cd /etc/init.d/; ls`
do
    alias "rc${service}"="/etc/init.d/${service}"
done


David
_________________
faster 'emerge -s'? emerge esearch
Back to top
View user's profile Send private message
fimblo
Guru
Guru


Joined: 19 Feb 2003
Posts: 306
Location: European Union, Stockholm

PostPosted: Wed Oct 15, 2003 8:32 pm    Post subject: Reply with quote

man this thread has covered alot... but one thing I love is bash, and the fact that its actually a complete programming language (turing complete). I've never really bothered to learn it completely, but using loops from the bash prompt is useful if you want to move MANY files, so many, in fact, that the wildcard doesnt work.

Code:
mkdir manyfilesdir ; cd manyfilesdir
perl -e 'while ($n++ < 30000) { `touch $n`; }' # makes damn many files
for file in `find .` ; do test -f $file && rm $file && echo $file; done


er, just a warning- this is an example, I dont know how many inodes you have left on your system... and I dont know what would happen if they run out... I tested it anyway making 100000 and it worked fine.

The point was anyway that you can automate things a bit more... I use this alot when I want to make thumbnails of many jpg files, or doing latex and dvips on many tex files

Code:

for x in *.jpg; do convert -geometry 400x400+0+0 $x ${x/img/small_img}; done

for x in *tex; do latex $n && dvips -o ${x/.tex/.ps} $x ; done


/fimblo
_________________
http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto
Back to top
View user's profile Send private message
gwydion
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 151
Location: Michigan, USA

PostPosted: Tue Oct 21, 2003 1:43 am    Post subject: Reply with quote

haceye wrote:
Hi,

I hate typing /etc/init.d/... over and over, so I added this to my /root/.bashrc:

Code:
for service in `cd /etc/init.d/; ls`
do
    alias "rc${service}"="/etc/init.d/${service}"
done


David

A few months ago I noticed a friend starting a service on his mandrake box with the 'service' command, and I thought it was pretty nifty... better than '/etc/init.d/blah' ...

so I wrote this script, and stuck it in /usr/sbin
Code:
#!/bin/bash
 
service=$1 ; shift
/etc/init.d/$service "$@"


Slightly different approach, but 'service blah start|stop|restart|zap' strikes me as ... logical.
_________________
Linux User #223670
Back to top
View user's profile Send private message
neenee
Veteran
Veteran


Joined: 20 Jul 2003
Posts: 1786

PostPosted: Tue Oct 21, 2003 7:54 am    Post subject: Reply with quote

thanks. i love this one. it saves me quite a bit of time
when i disable/enable wshaper.
_________________
proud to be a scout and a chronic penguin hugger
Legion of Lore - site
Back to top
View user's profile Send private message
dub.wav
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2003
Posts: 149
Location: Norway

PostPosted: Tue Oct 21, 2003 5:51 pm    Post subject: Reply with quote

Here's a script to get stuff from cvs.

Code:

#!/bin/bash
sites="SourceForge Gnome Xiph"

function read_project() {
echo -n "Project: "
read p
}

function read_module() {
echo -n "Module: "
read m
}

function read_revision() {
echo -n "Revision (if any): "
read r
}

function ext() {
CVSROOT="$site" $*
}

function cvsget() {
ext cvs login || exit
read_module
read_revision
if [ -z "$r" ];then
   ext cvs -z3 checkout $m
else
   ext cvs -z3 checkout -r $r $m
fi   
}

function sf() {
read_project
local site=":pserver:anonymous@cvs.sourceforge.net:/cvsroot/$p"
cvsget
}

function gnome() {
local site=":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome"
cvsget
}

function xiph() {
local site=":pserver:anoncvs@xiph.org:/usr/local/cvsroot"
cvsget
}

function menu() {
n=1
while [ "$site" != "4" ]
do
echo "Choose site, or press 4 to exit."
for i in $sites
do
   echo "$n) $i"
   (( n++ ))
done
echo -n "> "
read site
   case "$site" in
      "1"       ) sf;;
      "2"      ) gnome;;
      "3"      ) xiph;;
      "4"      ) ;;
      *        ) echo "Wrong arg";;
   esac
   n=1
done
}
menu

Adding more cvs sites is pretty straightforward:
- Add the name of the cvs site to $sites
- Add a function
- Add it to case
- Increase the "exit" number:
Code:

while [ "$site" != "4" ]
..
      "4"      ) ;;

Saves me some time anyway :)
Back to top
View user's profile Send private message
Hydralisk
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2003
Posts: 83

PostPosted: Wed Oct 22, 2003 7:46 pm    Post subject: Reply with quote

Code:

emerge zsh


(If you liked bash, wait till you try zsh. :) )
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Wed Oct 22, 2003 7:59 pm    Post subject: Reply with quote

I always felt like bash + bash-completion script was superior to zsh - just my opinion. Can you tell us what makes zsh better than bash for you?
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Thu Oct 23, 2003 10:06 pm    Post subject: Reply with quote

softchill wrote:
I've seen lots of nice tips and I got a few for you.

Special character and string interpreted by the terminal
Someone made an alias to clean the screen when you logout... I got better:
Code:
 clear > /etc/issue

then add what ever else you want getty to show before the login prompt.


If you use Bash, you can edit your .bash_logout and put "clear" in there... and anything else you want to show after the screen clear.
Back to top
View user's profile Send private message
jesterspet
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 215
Location: Atlanta

PostPosted: Fri Oct 24, 2003 2:37 am    Post subject: Reply with quote

The best tip I recieved after migrating over to a *nix based work enviroment, was:

:idea: Dude, have you checked out this mailing list :?:

As far as handy tweaks go, since I am a Vim fan, I took a tip from the aforementioned mailing list and made an enviroment enhancement for my self, by adding the following to my ~/.bashrc:
Code:
export MANPAGER='col -b | view -c 'set ft=man nomod nolist' -"


It gives you colored syntax highlighting & if you know a bit about vim, you can customize the color scheme to your personal tastes.

That tip is right up there with:

:idea: Have you tried Gentoo :?:
_________________
(X) Yes! I am a brain damaged lemur on crack, and would like to buy your software package for $499.95
Back to top
View user's profile Send private message
pr0phet
n00b
n00b


Joined: 18 Oct 2003
Posts: 8
Location: U.S., SE Charlotte

PostPosted: Fri Oct 24, 2003 6:21 am    Post subject: bash logout stuff Reply with quote

Seen some posts where peeps used some aliases for clearing the screen on logout. How about this...

Code:
touch ~/.bash_logout
echo 'clear' > ~/.bash_logout
echo 'find ~/ -name "core" -exec rm -f {} \;' >> ~/.bash_logout


gnome 2.4 has a nasty habit of placing core files in your home directory, using the find command in .bash_logout to search and destroy is a good way to cleanup your home directory. You can do all kinds of stuff with ~/.bash_logout :wink:
_________________
"..this world is not your home, so don't make yourselves cozy in it. Don't indulge your ego at the expense of your soul." -1 Peter 2:11

"All that is not eternal is eternaly useless." -C.S. Lewis

V.Parsons aka pr0phet


Last edited by pr0phet on Fri Oct 31, 2003 1:24 am; edited 1 time in total
Back to top
View user's profile Send private message
fimblo
Guru
Guru


Joined: 19 Feb 2003
Posts: 306
Location: European Union, Stockholm

PostPosted: Fri Oct 24, 2003 6:22 am    Post subject: Reply with quote

Quote:
The best tip I recieved after migrating over to a *nix based work enviroment, was:

:idea Dude, have you checked out this mailing list :?


your link doesnt work :P

EDIT: now it seems to work :)
/fimblo
_________________
http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto
Back to top
View user's profile Send private message
iplayfast
l33t
l33t


Joined: 08 Jul 2002
Posts: 642
Location: Cambridge On,CA

PostPosted: Sat Oct 25, 2003 5:46 am    Post subject: My tips Reply with quote

when in konqueror use man:topic to find something
Code:
for example:
man:ls

You can use your mouse for cross referencing.

And ever wonder how far through an emerge you are?
well most packages are either c or cpp files. So
Code:

you must be root to do this
find /var/tmp/portage/PackageName/ -iname "*.c*" | wc -l

This will tell you how many c/c++ files there are.
Code:

find /var/tmp/portage/PackageName/ -iname "*.o*" | wc -l

This will tell you how many files have been built.

Subtract the two and you know approximatly how far you have to go.
Back to top
View user's profile Send private message
pr0phet
n00b
n00b


Joined: 18 Oct 2003
Posts: 8
Location: U.S., SE Charlotte

PostPosted: Sat Oct 25, 2003 8:56 am    Post subject: nifty service script Reply with quote

* UPDATE *
go here https://forums.gentoo.org/viewtopic.php?t=101984 and check and update for this. I started a new thread specifically for this.

I saw a couple posts concerning the nifty service function RedHat provides as opposed to having to type out /etc/init.d/foo {start|stop|status}

I happen to be running a rh server and tried the service script on my gentoo box. And it worked without any modifications. That's not to say it doesn't need any modification, but it works nonetheless.

For those interrested, here is the script...
Code:
#!/bin/sh

# Set up a default search path.
PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"
export PATH

VERSION="`basename $0` ver. 0.91"
USAGE="Usage: `basename $0` < option > | --status-all | \
[ service_name [ command | --full-restart ] ]"
SERVICE=
SERVICEDIR="/etc/init.d"
OPTIONS=

if [ $# -eq 0 ]; then
   echo $"${USAGE}" >&2
   exit 1
fi

cd /
while [ $# -gt 0 ]; do
  case "${1}" in
    --help | -h | --h* )
       echo $"${USAGE}" >&2
       exit 0
       ;;
    --version | -V )
       echo $"${VERSION}" >&2
       exit 0
       ;;
    *)
       if [ -z "${SERVICE}" -a $# -eq 1 -a "${1}" = "--status-all" ];
then
          cd ${SERVICEDIR}
          for SERVICE in * ; do
            case "${SERVICE}" in
              functions | halt | killall | single| linuxconf| kudzu | \
                  *rpmorig | *rpmnew | *rpmsave | *~ | *.orig)
                  ;;
              *)
                if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
                  env -i LANG=$LANG PATH=$PATH TERM=$TERM
"${SERVICEDIR}/${SERVICE}" status
                fi
                ;;
            esac
          done
          exit 0
       elif [ $# -eq 2 -a "${2}" = "--full-restart" ]; then
          SERVICE="${1}"
          if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
            env -i LANG=$LANG PATH=$PATH TERM=$TERM
"${SERVICEDIR}/${SERVICE}" stop
            env -i LANG=$LANG PATH=$PATH TERM=$TERM
"${SERVICEDIR}/${SERVICE}" start
            exit $?
          fi
       elif [ -z "${SERVICE}" ]; then
         SERVICE="${1}"
       else
         OPTIONS="${OPTIONS} ${1}"
       fi
       shift
       ;;
   esac
done

if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
   env -i LANG=$LANG PATH=$PATH TERM=$TERM "${SERVICEDIR}/${SERVICE}"
${OPTIONS}
else
   echo $"${SERVICE}: unrecognized service" >&2
   exit 1
fi


I'll play around with this script to make it more suited to Gentoo, if anyone is interrested, i'll repost the modified script.
enjoy :D[/url]
_________________
"..this world is not your home, so don't make yourselves cozy in it. Don't indulge your ego at the expense of your soul." -1 Peter 2:11

"All that is not eternal is eternaly useless." -C.S. Lewis

V.Parsons aka pr0phet


Last edited by pr0phet on Sun Nov 02, 2003 4:06 am; edited 1 time in total
Back to top
View user's profile Send private message
pr0phet
n00b
n00b


Joined: 18 Oct 2003
Posts: 8
Location: U.S., SE Charlotte

PostPosted: Sat Oct 25, 2003 9:04 am    Post subject: nifty service script Reply with quote

Just as a warning.
Don't issue "service --status-all" especially if you've ssh'd into your box from a remote location. 8O
When it reaches halt.sh it brings down the house! So be aware of this.
_________________
"..this world is not your home, so don't make yourselves cozy in it. Don't indulge your ego at the expense of your soul." -1 Peter 2:11

"All that is not eternal is eternaly useless." -C.S. Lewis

V.Parsons aka pr0phet
Back to top
View user's profile Send private message
VisualPhoenix
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2002
Posts: 135
Location: (CT v NJ)

PostPosted: Sat Oct 25, 2003 7:22 pm    Post subject: Reply with quote

I have a couple machines that I like to ssh over vnc with so I wrote the following script to make my connection to them easier:

sshvnc
Code:

#!/bin/sh
screen ssh -C -X -L 5901:localhost:5901 ${1}
vncviewer -depth 16 -compresslevel 8 -quality 0 -encodings Tight ${2}
screen -r
screen -wipe


sshvnc my.server.com localhost:1

i'm sure it can be improved - but i find it quite handy.

also - if you want to bypass the entire screen process (if using tightvnc) try:

sshtvnc
Code:

vncviewer  -depth 16 -compresslevel 8 -quality 0 -encodings Tight -via ${1} ${2}
Back to top
View user's profile Send private message
sman
n00b
n00b


Joined: 21 Aug 2003
Posts: 23

PostPosted: Sun Oct 26, 2003 12:34 pm    Post subject: Make your startup MUCH faster... Reply with quote

changing RC_PARALLEL_STARTUP="no" to "yes" in
/etc/conf.d/rc
took ~20 seconds off my boot time
Back to top
View user's profile Send private message
Vhata
n00b
n00b


Joined: 17 Oct 2002
Posts: 4
Location: Rhodes University, South Africa

PostPosted: Mon Oct 27, 2003 7:52 pm    Post subject: Reply with quote

This is a script I wrote to do the equivalent of 'emerge -s' (or 'emerge search'). I find the time emerge takes to search through the portage tree rather irritating, so I used bash to shortcut it. It's not perfect (the 'latest version available' thing doesn't always work, for example, but that is the fault of 'gnuls -v', not mine ;-), but I find it very useful.

I've put it in /usr/local/bin/describe:

#!/bin/bash
search=$1
. /etc/make.conf
(for z in /usr/portage/*/*$search*/*.ebuild ${PORTDIR_OVERLAY}/*/*$search*/*.ebuild
do
if [ -e $z ]
then
categpkg=`echo $z | cut -d'e' -f2- | cut -d'/' -f2,3`
descr=`cat $z | egrep '^\s*DESCRIPTION\s*=' | cut -d'=' -f2-`
homepage=`cat $z | egrep '^\s*HOMEPAGE\s*=' | cut -d'=' -f2- | cut -d'"' -f2`
ver=`ls -d /var/db/pkg/$categpkg* 2> /dev/null || echo none`
ver=`echo $ver | rev | cut -d'/' -f1,2 | rev`
ver=${ver/$categpkg-/}
latest=`echo $z | rev | cut -d'/' -f2- | rev`
latest=`ls -rv $latest/*.ebuild | head -1 | rev | cut -d'/' -f1,2 | cut -d. -f2- | rev`
pname=`echo $latest | cut -d'/' -f1`
latest=`echo $latest | cut -d'/' -f2`
latest=${latest/$pname-/}

printf "\033[01;31m$categpkg\033[00m: "
printf "\033[32m$descr\033[00m "
printf "( \033[01;34m$homepage\033[00m ) "
printf "[ installed: \033[01;32m$ver\033[00m; "
printf "latest: \033[01;32m$latest\033[00m ]\n"
fi
done) | sort | uniq


And, as an example:

$ describe editor
app-editors/hteditor: "HT Editor - editor for executable files" ( http://hte.sf.net/ ) [ installed: none; latest: 0.7.3 ]
app-editors/kxmleditor: "KDE XML Editor" ( http://kxmleditor.sourceforge.net ) [ installed: 0.8.1; latest: 0.8 ]
dev-util/gst-editor: "GStreamer graphical pipeline editor" ( ) [ installed: none; latest: 0.5.0 ]
gnome-extra/gconf-editor: "An editor to the GNOME 2 config system" ( http://www.gnome.org/ ) [ installed: 2.4.0; latest: 2.4.0 ]
gnome-extra/gconf-editor: "an editor to the GConf2 system" ( http://www.gnome.org/ ) [ installed: 2.4.0; latest: 2.4.0 ]
media-gfx/kimagemapeditor: "An imagemap editor for KDE" ( http://kimagemapeditor.sourceforge.net/ ) [ installed: none; latest: 0.9.5.1 ]
net-zope/externaleditor: "Allows you to use your favorite editor(s) from ZMI." ( http://www.zope.org/Members/Caseman/${MY_PN}/ ) [ installed: none; latest: 0.7 ]
net-zope/externaleditor: "Allows you to use your favorite editor(s) from ZMI." ( http://www.zope.org/Members/Caseman/ExternalEditor/ ) [ installed: none; latest: 0.7 ]
_________________
No trumpets, no drums.
Jonathan Hitchcock
Back to top
View user's profile Send private message
tactless
l33t
l33t


Joined: 14 Jul 2002
Posts: 642
Location: Mitzpe Adi, Israel

PostPosted: Mon Oct 27, 2003 8:32 pm    Post subject: Reply with quote

This one was in the GWN, but is worth mentioning:
Ever forgot to turn on your ADSL/Cable modem when turning your machine on, thus having a lot of services not start up? Ever needed to bring a service down, but then needed to bring all of its dependencies back up with it? I used to do this:
Code:
for i in `find /etc/runlevels/default`; $i start; done

But this is shorter:
Code:
rc


Yep. Works.
_________________
Tactless

"If it wasn't for fog, the world would run at a really crappy framerate."

Jabber: tactless@amessage.info
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Mon Oct 27, 2003 8:34 pm    Post subject: Reply with quote

Vhata wrote:
I find the time emerge takes to search through the portage tree rather irritating


Check out 'esearch' - you'll probably have to unmask it. It generates a static index (eupdatedb) which takes around 20 minutes the first time on my Athlon TBird 1.2GHz but the search speed is incredible. Try it and see :)

Although it helps to update it every time the portage tree changes, subsequent eupdatedb invocations seem much faster. A cronjob would work well here.
Back to top
View user's profile Send private message
reeder
n00b
n00b


Joined: 02 Apr 2003
Posts: 45
Location: Plano, TX

PostPosted: Mon Oct 27, 2003 8:43 pm    Post subject: Reply with quote

A few years ago I would have recommended hanging onto your keypunch machine because every now and then the only input device working is the card reader. :-)

Now one of my favorite tips is to learn ed(1). Sometimes your fool screen editors just won't work, but ed(1) will! It's bailed me out more than once.

-- William
Back to top
View user's profile Send private message
tomk
Bodhisattva
Bodhisattva


Joined: 23 Sep 2003
Posts: 7221
Location: Sat in front of my computer

PostPosted: Tue Oct 28, 2003 12:46 am    Post subject: Reply with quote

OK, I think bashis great so I'll give you my favourite bash tips (sorry if you know them already)

Say I want to edit two files (File1.java and File2.java) in the same directory use the curly braces to say you some typing:

Code:
joe /foo/bar/File{1,2}.java


Just make sure you get the order right, especially when using it with mv.

Ctrl-R will let you search your bash history to find that really long command you used a while ago, just type the first few letters after hitting Ctrl-R and the whole commmand will be ready for you just to press enter.

Ctrl-T will swap the last two characters around, handy for when you tpye lkie thsi.

One more which I only found out about a few days ago is that you can move the cursor to begining and end of words holding down Ctrl and pressing the left and right cursor keys.

Tom
Back to top
View user's profile Send private message
redog
n00b
n00b


Joined: 06 Nov 2002
Posts: 35

PostPosted: Tue Oct 28, 2003 3:02 pm    Post subject: Reply with quote

amne wrote:
things that may be useful for you:

hint #1:
having a backup is always a good idea (ok, i have already had 3 ibm drives that died ;) )

TrueDat!!!
amne wrote:

hint #2:
don't delete something to restore it from your backup if you didn't back it up.

I would hope that this is common sence
amne wrote:

hint #3:
most services (sshd, squid) can be configured to listen only at your lan device, which makes it unnecessary to set up iptables to block the open port at your world device (i did that in my early linux times).

Unnecessary mabe but I still suggest doing so. With iptables you dont have to imply each and every port you want blocked, a catchall rule is a must IMO. Why give a malicious daemon any chance, or ports to which it might bind. It could easly act like squid or apache or any other gnu service , close those ports man...You oughta checkout firehol damn nice iptables tool.
Back to top
View user's profile Send private message
jesterspet
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 215
Location: Atlanta

PostPosted: Tue Oct 28, 2003 4:08 pm    Post subject: Reply with quote

When I first saw this thread, It was for favorite tips. To me that means the ofter overlooked & simple ways of improving your computing experience.

Following that line of thought, here is another good tip:

:arrow: One way to speed up the interaction time of a shell (that does not hash its commands) that you may overlook is to modify your path. The order of the directories in your path should rely on the number of commands you use most. So /usr/bin or /bin would probably be first. Very large directories that are mounted over the network should be later in the list. If there are some directories in your path you only use for one or two commands consider making an alias or shell script (if your shell doesn't support aliases) which calls the program with its full path name.

shamlessly stolen from the UGU tips list
_________________
(X) Yes! I am a brain damaged lemur on crack, and would like to buy your software package for $499.95
Back to top
View user's profile Send private message
redog
n00b
n00b


Joined: 06 Nov 2002
Posts: 35

PostPosted: Tue Oct 28, 2003 4:38 pm    Post subject: Some tips I didnt see Reply with quote

I like both bash and vi. so I enable vi mode in bash with
Code:
set -o vi

So, to access bash history I can use "k" and "j" insted of the arrows(which are sooo far away :) )
go to the end of a line and begin typeing with "A"
get into insert mode with the regular vi commands "i" "a" "A"
and out with <esc>
you get undo, "u" I haven't figured out redo since ^r is bashes history search.
We can get to the begining of the line with 0 aka:zero
As well as alot of other useful vi commands. dG, d$ , d^ , b , e .....
And the look of concern on your co-workers face as to why they cannot type in your term (when its in command mode) is the best!


Also a neet command I havent seen mentioned is fc.
fc "Fix Command" is a builtin bash command for editing or recalling the history
Code:
alias r='fc -e -'
I alias it to this so that all I need to type is r v and the last command I issued starting with the letter v is re-executed. -Thanks Sam!

fc -l is just like history | tail -17

And I helped a guy once who wanted this behavior, I forget why , but mabe someonelse will find it useful...
For an aditional script to run when you logout of bash you can set this trap in ~/.profile
Code:
trap '[[ -r $HOME/.bash_logout ]] && . $HOME/.someother_logout' 0 1 3 15
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Goto page Previous  1, 2, 3, 4, 5 ... 15, 16, 17  Next
Page 4 of 17

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum