Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh script wipes out my PROMPT and RPROMPT
- X-seq: zsh-users 1276
- From: Timothy J Luoma <luomat+zsh+users@xxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: zsh script wipes out my PROMPT and RPROMPT
- Date: Sat, 24 Jan 98 15:23:43 -0500
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author