zsh-users
 help / color / mirror / code / Atom feed
* zsh script wipes out my PROMPT and RPROMPT
@ 1998-01-24 20:23 Timothy J Luoma
  1998-01-24 22:13 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Timothy J Luoma @ 1998-01-24 20:23 UTC (permalink / raw)
  To: zsh-users


This script wipes out the PROMPT and RPROMPT

This is for zsh 3.0.5 (both the script and my login shell)


#!/usr/local/bin/zsh -f

PATH=/Users/luomat/Unix/bin:/Users/luomat:/usr/local/gnu/bin:/usr/local/bin:/bin:/usr/ucb:/usr/bin:/usr/etc:/usr:/etc

TIME=`date +"%s"`

NAME=`basename $0`

FILE=${HOME}/.$NAME.$TIME

netstat -n 				|\
	fgrep ESTABLISHED 		|\
	fgrep -v '192.42.172.2'		|\
	awk '{print $4"\t\t"$5}' > $FILE

LINES=`wc -l $FILE | awk '{print $1}'`

for i in {1..$LINES}; do

	INFO=`cat -n $FILE |\
		sed 's/ *//g' |\
			grep -w "^$i" |\
				awk '{print $2" "$3}'`
	
	echo "Line $i: $INFO"	

done

echo "Here is the file:"
cat $FILE

rm -f $FILE

exit 0



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-01-25 15:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-24 20:23 zsh script wipes out my PROMPT and RPROMPT Timothy J Luoma
1998-01-24 22:13 ` Bart Schaefer
1998-01-24 22:29   ` Timothy J Luoma
1998-01-24 22:52     ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).