WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: bash  (Read 5053 times)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
bash
« on: April 05, 2009, 11:10:59 AM »
Added a basic bashrc for history keeping and environment variables.  Ideas for the default bashrc are welcome.:

Code: [Select]
Title:          bash.tce
Description:    bash for tinycore
Version:        3.2
Author:         Chet Ramey
Original-site:  www.gnu.org/software/bash/
Copying-policy: GPL
Size: 384K
Extension_by:   Jason W
Comments:       Bash is a shell for Linux.
                ----------
Change-log:     2008/07/23 First version
        2008/09/09 Removed the symlink /bin/sh -> /bin/bash.
/bin/sh needs to remain pointing to busybox ash.
This extension is PPI compatible.
        2008/11/27 Recompiled for 486 and size optimization.
                2009/02/02 Made PPI compatible.
Current: 2009/04/05 Added basic bashrc

Code: [Select]
Title:          bash.tcz
Description:    bash for tinycore
Version:        3.2
Author:         Chet Ramey
Original-site:  www.gnu.org/software/bash/
Copying-policy: GPL
Size: 384K
Extension_by:   Jason W
Comments:       Bash is a shell for Linux.
                ----------
Change-log:     2008/07/23 First version
        2008/09/09 Removed the symlink /bin/sh -> /bin/bash.
/bin/sh needs to remain pointing to busybox ash.
This extension is PPI compatible.
        2008/11/27 Recompiled for 486 and size optimization.
                2009/02/02 Made PPI compatible.
Current: 2009/04/05 Added basic bashrc
« Last Edit: April 05, 2009, 11:12:53 AM by Jason W »

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: bash
« Reply #1 on: April 05, 2009, 12:03:31 PM »
All I have in my bashrc are aliases and PS1.  The PS1 changes if I'm root, but I don't know if that would be useful for a default.  I also don't know for sure if this still needed for my setup =o)
I'd done it originally because I couldn't see any difference between regular and root terms, but it may have changed since busybox was updated.

A couple of my aliases might be useful for the general public, but I wouldn't say they're worth adding as defaults.
alias :q='clear; exit' # because I keep thinking I'm in Vim =o)
alias path='echo -e ${PATH//:/\\n}' # displays directories in $PATH on separate lines
alias ping='ping -c 4' # keeps you from needing to manually stop it
I haven't used ping in TC, so that might not work...might need a "sudo"

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: bash
« Reply #2 on: April 05, 2009, 12:06:50 PM »
alias ping='ping -c 4' # keeps you from needing to manually stop it

if you wanted to use ping without that option, how would you turn it off (other than setting 4 to a very large number or removing it from bashrc)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: bash
« Reply #3 on: April 05, 2009, 01:24:55 PM »
By using the full path, or using "busybox ping"
The only barriers that can stop you are the ones you create yourself.

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: bash
« Reply #4 on: April 05, 2009, 01:43:19 PM »
You can also bypass aliases by escaping them:  \ping

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: bash
« Reply #5 on: April 05, 2009, 02:04:00 PM »
very cool, thanks.