home/.bashrc: ppid -r implemented.
This commit is contained in:
parent
5699f0b461
commit
afa30b4463
|
@ -35,7 +35,7 @@ set_color_prompt() {
|
||||||
6..7,9..11,13..15,40..51,75..87,113..123,147..159,171..231,249..254),
|
6..7,9..11,13..15,40..51,75..87,113..123,147..159,171..231,249..254),
|
||||||
(map { "$_\n231\n" }
|
(map { "$_\n231\n" }
|
||||||
1..9,12..13,16..45,52..81,88..116,124..151,153,160..180,
|
1..9,12..13,16..45,52..81,88..116,124..151,153,160..180,
|
||||||
182..185,187..189,196..214,232..252,255..254));
|
182..185,188..189,196..214,232..252,255..254));
|
||||||
for(@ARGV) {
|
for(@ARGV) {
|
||||||
srand(hex(B::hash($_))+$ENV{PERL_HASH_SEED});
|
srand(hex(B::hash($_))+$ENV{PERL_HASH_SEED});
|
||||||
print @c[rand()* ($#c+1)];
|
print @c[rand()* ($#c+1)];
|
||||||
|
@ -248,9 +248,22 @@ PATH=$PATH:$ORACLE_HOME/bin
|
||||||
export ORACLE_HOME
|
export ORACLE_HOME
|
||||||
export ORACLE_SID=XE
|
export ORACLE_SID=XE
|
||||||
ppid() {
|
ppid() {
|
||||||
for _pid in "$@" ; do
|
if [ "x$1" = "x-r" ] ; then
|
||||||
ps -o ppid -p "$_pid" | tail -n1;
|
shift
|
||||||
done
|
ppid=$(ppid $1)
|
||||||
|
if [ "x$ppid" = "x" ] ; then
|
||||||
|
: skip
|
||||||
|
else
|
||||||
|
echo $ppid
|
||||||
|
ppid -r $ppid
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "0$1" -gt "1" ] ; then
|
||||||
|
for _pid in "$@" ; do
|
||||||
|
ps -o ppid -p "$_pid" | tail -n1;
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add dotnet + go binaries
|
# Add dotnet + go binaries
|
Loading…
Reference in a new issue