Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/root Use "head -1" as a generic way to snarf the first l...



details:   https://anonhg.NetBSD.org/src/rev/306b7a5a7cbc
branches:  trunk
changeset: 504406:306b7a5a7cbc
user:      tv <tv%NetBSD.org@localhost>
date:      Thu Mar 01 22:30:41 2001 +0000

description:
Use "head -1" as a generic way to snarf the first line of the pid file;
also works with the existing alias in dot.shrc.

diffstat:

 etc/root/dot.cshrc |  4 ++--
 etc/root/dot.shrc  |  4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 949b937b213d -r 306b7a5a7cbc etc/root/dot.cshrc
--- a/etc/root/dot.cshrc        Thu Mar 01 22:26:57 2001 +0000
+++ b/etc/root/dot.cshrc        Thu Mar 01 22:30:41 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: dot.cshrc,v 1.12 2001/03/01 22:26:57 atatat Exp $
+#      $NetBSD: dot.cshrc,v 1.13 2001/03/01 22:30:41 tv Exp $
 
 set history=1000
 set path=(/sbin /usr/sbin /bin /usr/bin /usr/pkg/sbin /usr/pkg/bin /usr/X11R6/bin /usr/local/sbin /usr/local/bin)
@@ -9,7 +9,7 @@
 setenv BLOCKSIZE 1k
 
 alias  h       history
-alias  hup     '( set pid=$< ; kill -HUP $pid ) < /var/run/\!$.pid'
+alias  hup     'kill -HUP `head -1 /var/run/\!$.pid`'
 alias  j       jobs -l
 alias  ll      ls -l
 
diff -r 949b937b213d -r 306b7a5a7cbc etc/root/dot.shrc
--- a/etc/root/dot.shrc Thu Mar 01 22:26:57 2001 +0000
+++ b/etc/root/dot.shrc Thu Mar 01 22:30:41 2001 +0000
@@ -1,6 +1,6 @@
-#      $NetBSD: dot.shrc,v 1.3 2000/05/14 23:13:54 simonb Exp $
+#      $NetBSD: dot.shrc,v 1.4 2001/03/01 22:30:41 tv Exp $
 
-hup(){ kill -HUP `cat /var/run/$1.pid`; }
+hup(){ kill -HUP `head -1 /var/run/$1.pid`; }
 ll(){ ls -l ${1+"$@"}; }
 
 case "$-" in *i*)



Home | Main Index | Thread Index | Old Index