Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add f2c(), c2f()

  • Loading branch information...
commit 480955f4b4686b5f7871cf049cc67aab809370a0 1 parent fc9684f
@gtkiller gtkiller authored
Showing with 22 additions and 9 deletions.
  1. +22 −9 bash/.bashrc
View
31 bash/.bashrc
@@ -46,8 +46,8 @@ export XAUTHORITY="$HOME/.Xauthority"
alias du0='du -h --max-depth=0 -P'
alias du1='du -h --max-depth=1 -P'
alias d='dict -h dict.org'
-alias ll='ls -la --color=auto'
alias ls='ls --color=auto'
+alias ll='ls -lA'
alias cvs='colorcvs'
alias screen='screen -U'
alias vim='vim -N'
@@ -65,7 +65,7 @@ alias defg++='echo "main(){}" | g++ -E -x c++ -dM - '
alias defgcc='echo "main(){}" | gcc -E -x c -dM - '
alias teamviewer='/opt/teamviewer6/teamviewer'
-lsol ()
+lsol()
{
lsof -p $1 | grep lib | awk '{ print $9 }' | sort
}
@@ -73,7 +73,7 @@ lsol ()
rsed()
{
if [ $# -ne 3 ]; then
- echo "Usage: `basename $0` what replacement where"
+ echo "Usage: `basename $0` <what> <replacement> <where>"
return 1
fi
for f in $(find . -type f -regex "${3}"); do
@@ -93,11 +93,6 @@ then
fi
ulimit -c unlimited
-# Midnight Commander chdir enhancement
-if [ -f /usr/share/mc/mc.gentoo ]; then
- . /usr/share/mc/mc.gentoo
-fi
-
gdb_get_backtrace() {
local exe=$1
local core=$2
@@ -117,9 +112,27 @@ d2h()
h2d()
{
- bc <<< "ibase=16; $1"
+ v=$(tr '[:lower:]' '[:upper:]' <<< $1)
+ bc <<< "ibase=16; $v"
+
+}
+
+f2c()
+{
+ let t=$1-32
+ let t=$t*5/9
+ echo $t
}
+c2f()
+{
+ let t=$1*9/5
+ let t=$t+32
+ echo $t
+}
+
+export defgcc lsol rsed d2h h2d f2c c2f
+
# Some konsole magic
function set_konsole_tab_name()
{
Please sign in to comment.
Something went wrong with that request. Please try again.