File: bash_aliases-de

package info (click to toggle)
user-de 0.7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 60 kB
  • sloc: sh: 73; makefile: 33
file content (95 lines) | stat: -rw-r--r-- 1,929 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/sh 
# $Source: /usr/src/user-de-0.6/RCS/bash_aliases-de,v $
# $Id: bash_aliases-de,v 1.3 1998/02/20 18:49:06 leutloff Exp $
# 
# Some useful aliases. (derived from Bash_aliases from bash examples!)
alias texclean='rm -f *.toc *.aux *.log *.cp *.fn *.tp *.vr *.pg *.ky'
alias clean='echo -n "Soll diese Verzeichnis wirklich aufgerumt werden?";
	read yorn;
	if test "$yorn" = "y" -o "$yorn" = "j" ; then
	   rm -f \#* *~ .*~ *.bak .*.bak  *.tmp .*.tmp core a.out;
	   echo "Aufgerumt.";
	else
	   echo "Nicht aufgerumt.";
	fi'
alias h='history'
alias j="jobs -l"
alias ll="ls -l"
alias ls="ls -F"
alias l.='ls .[a-zA-Z0-9]*'
alias pu="pushd"
alias po="popd"

# aliases for the more novice (and DOS aware) people
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias cls='clear'
alias md='mkdir'
alias rd='rmdir'
#alias dir='ls -al' not nessary, because there is an executable /bin/dir
alias copy='cp -i'
alias del='rm -i'

alias l='ls -lF'
# if [ -x /usr/bin/less ]; then
# 	alias l='less'
# else
# 	alias l='more'
# fi
if [ ! -z $DISPLAY ]; then
	if [ -x /usr/X11R6/xless ]; then
		alias m='xless'
	fi
fi

alias psl='ps -aux | less'
alias ..='cd ..'
alias .='echo $PWD'


#
# Csh compatability:
#
alias unsetenv=unset
function setenv () {
  export $1="$2"
}

# Function which adds an alias to the current shell and to
# the ~/.bash_aliases file.
add-alias ()
{
   local name=$1 value="$2"
   echo alias $name=\'$value\' >>~/.bash_aliases
   eval alias $name=\'$value\'
   alias $name
}

# "repeat" command.  Like:
#
#	repeat 10 echo foo
repeat ()
{ 
    local count="$1" i;
    shift;
    for i in $(seq 1 "$count");
    do
        eval "$@";
    done
}

# Subfunction needed by `repeat'.
seq ()
{ 
    local lower upper output;
    lower=$1 upper=$2;

    if [ $lower -ge $upper ]; then return; fi
    while [ $lower -le $upper ];
    do
	echo -n "$lower "
        lower=$(($lower + 1))
    done
    echo "$lower"
}