X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=.bashrc;h=8e1ca7560e66511980aefe85f8cbf3147a9a999e;hp=842e9548fca8170722c09c7a2b7ffa0d50d70888;hb=c5b4eba076b89d86315fb9b5bb9b18d050072c21;hpb=2dea7f4f436546bb422f59911f406d500985d01f diff --git a/.bashrc b/.bashrc index 842e954..8e1ca75 100644 --- a/.bashrc +++ b/.bashrc @@ -167,7 +167,7 @@ for file in $HOME/.bookmarks.html;do done export GREP_OPTIONS="--binary-files=without-match --directories=skip" if echo x|GREP_OPTIONS="--exclude=y" grep -q x 2>/dev/null;then - export GREP_OPTIONS="$GREP_OPTIONS --exclude=tags --exclude=TAGS --exclude=CVS --exclude=ChangeLog*" + export GREP_OPTIONS="$GREP_OPTIONS --exclude=tags --exclude=TAGS --exclude=CVS --exclude=ChangeLog* --exclude=*.svn-base" # FIXME: grep(1) ignores subdirectories for --exclude. #export GREP_OPTIONS="$GREP_OPTIONS --exclude=testsuite --exclude=.pc --exclude=.svn" fi @@ -183,6 +183,7 @@ export HISTSIZE=100000 export HISTFILESIZE="$HISTSIZE" export GDBHISTFILE="$HOME/.gdb_history" export CVS_RSH="ssh" +export TZ=":/usr/share/zoneinfo/Europe/Prague" # Do not: grep -w "$TERM" /etc/termcap >/dev/null || export TERM=vt220 # as Sun workaround as Debian misses: /etc/termcap # expects: $uname_p @@ -277,6 +278,25 @@ function cvs {(unset cvs cvs $_line $_opts "$@" ); } function perlrpm { repoquery -q --whatprovides $(for i in "$@";do echo "perl($i)";done|sed -e 's/\//::/g' -e 's/[.]pm//g'); } +# `-u' limits the search to $UID. +function pidof +{(unset pidof + if [ "$1" = "-u" ];then + shift + local r="$(pidof "$@")" + local space="" + local p + for p in $r;do + if grep -q "$(echo -e "^Uid:\t$UID\t")" "/proc/$p/status";then + echo -n "${space}$p" + space=" " + fi + done + echo + else + pidof "$@" + fi +)} ulimit -S -c 0 set +H