summaryrefslogtreecommitdiffstats
path: root/corer
blob: d1411e3a39c1aa3a5364ab0d3e41b39430aee9f2 (plain)
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
#!/bin/zsh


>| /tmp/.core

args="[email protected]"

params=(${(s|:|)args})

CORE_DIR="/home/raghavendra/Arch/cores/"

temp=($CORE_DIR/*)

if [[ $#temp > 20 ]];then 
    echo "NO CORE  file for now. Space isn't infinite" >>| ~/Arch/.cores
    rm /tmp/.core
else
    mv /tmp/.core ~/Arch/cores/$args.core
fi
echo "Time $(date -d @$params[1]):

          File $params[2]
    with  PID  $params[3]
and killed by  $params[4]
Moved into  ~/Arch/cores/$args.core " >>| ~/Arch/.cores

echo "==========================
      ===========================" >>| ~/Arch/.cores