Browse Source

update for lab machine

pull/1/head
10sr 12 years ago
parent
commit
aaf29a0af4
2 changed files with 4 additions and 1 deletions
  1. +1
    -0
      bashrc
  2. +3
    -1
      profile

+ 1
- 0
bashrc View File

@@ -452,6 +452,7 @@ __my_battery_status(){
alias bat='__my_battery_status %s\\n' alias bat='__my_battery_status %s\\n'


ip-address(){ ip-address(){
test type ifconfig >/dev/null 2>&1 || return 1
local ip=$(LANG=C ifconfig | \grep --color=never "inet " | \grep --color=never -v "127.0.0.1" | awk '{print $2}') local ip=$(LANG=C ifconfig | \grep --color=never "inet " | \grep --color=never -v "127.0.0.1" | awk '{print $2}')
test -n "$ip" && printf $1 $ip test -n "$ip" && printf $1 $ip
} }


+ 3
- 1
profile View File

@@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh


# ~/.dotfiles/profile

type fortune >/dev/null 2>&1 && { type fortune >/dev/null 2>&1 && {
echo echo
fortune fortune
@@ -33,5 +35,5 @@ type setterm >/dev/null 2>&1 && setterm -blank 30 -powersave on # -powerdown 10
# in my environment powerdown does not work # in my environment powerdown does not work


mkdir -p ~/.my/log mkdir -p ~/.my/log
mkdir -p /tmp/$USER-tmp
mkdir -p "/tmp/$USER-tmp"



Loading…
Cancel
Save