$ ent2 3 inputfile | grep Position | sed 's/.*=\(.*\) .*=\(.*\)/\1 \2 /'
or
$ ent2 3 inputfile | grep Position | sed -e 's/Position=//' -e 's/Entropy=//'
or
$ ent 2 3 inputfile | grep Position | awk -F"=| " '{print $2, $4}'
(this awk script demonstrates how we use the field separator command -F
to define = or " " blank space as a delimiter, and as such
$1 is Position
delimiter =
$2 is the position number
$3 is Entropy
$4 is the entropy value)
1 0.954885
2 0.460826
3 0.228055
4 0
5 0
6 0
7 0
$ ent2 3 inputfile | grep Position | sed -e 's/Position=//' -e 's/Entropy=//' > ent.dat
$ echo "
set term jpeg
set output 'x.jpg'
plot 'ent.dat' with line " | gnuplot
$ konqueror x.jpg
will display the x.jpg file.
No comments:
Post a Comment