From a quick peek at your code, it looks like the block of if statements is executing on every single line that's read. And, since they test for every possible combination of arrow and choice, a counter will increment on each line read.
Regards,
Alister
---------- Post updated at 02:07 PM ---------- Previous update was at 01:51 PM ----------
Perhaps something along these lines will work (untested).
This solution is essentially the same as yinyuemi's minus the gsubs (sorry, missed that before I started).
Hello,
I am trying to count how many times a subject makes a correct switch or a correct stay response in a simple task. I have data on which condition they were in (here, labeled "IMAGINE" and "RECALL"), as well as whether they made a left or right button response, and whether the outcome was... (5 Replies)
Hi,
I want to perform a task using shell script. I am new to awk programming and any help would be greatly appreciated.
I have the following 3 files (for example)
file1:
Name count Symbol
chr1_1_50 10 XXXX
chr3_101_150 30 YYYY
File2:
Name ... (13 Replies)
#!/bin/ksh
db_user=$DB_USER_NAME
db_pwd=$DB_PASSWORD
db_sid=$TWO_TASK
if ; then
echo "\tUsage: MoveUsageProcessing <BC Log file Name>"
exit 1
else
BCLogFileName=$1
fi
grep -i 'MoveUsage daemon needs to run on this account before it can be billed' $1 |awk -F\| '{for(i=0;++i<=NF;) if($i ~... (1 Reply)
ret=`sqlplus -s /nolog << EOF
connect $db_user/$db_pwd@$db_sid;
SPOOL ./$DirectoryName/TableData.txt;
set pagesize 0 feedback off verify off heading off echo off linesize 150
while read var_ack_party_name
do
select * from bus_event where ack_party_name like... (13 Replies)
I have this input.|user1 |10.10.10.10 |23|046|1726 (212) |0
|user2 |10.10.10.11 |23|046|43 (17) |0
|test |10.10.10.12 |23|046|45 (10) |0
|test1 |10.10.10.13 |23|046|89 (32) |0
I need to get the data for a user like thisuser1 1726
user2 43
test 45
test1 89... (11 Replies)
Hi,
I hope you can help me with the awk command in shell scripting.
I want to do the following, but it doesn't work.
for i in $REF1 $REF2 $REF3; do
awk '{if($n>=0 && $n<=50000){count+=1}} END{print count}' ${DIR}${i} >${DIR}${i}_count.txt
done
REF1 to REF3 are only variables for .txt... (1 Reply)
Hi all,
Below is a script I'm writing and giving me error:
#!/usr/bin/sh
if ; then
echo "Success!"
else
echo "Failure!"
fi
Normally if I do ps -ef|grep dw.sap|wc -l it gives me output of 18. So my script checks if it's greater than 17 it echoes success else failure
... (5 Replies)
Discussion started by: frum
5 Replies
LEARN ABOUT DEBIAN
goo::canvas::polylinemodel
Goo::Canvas::PolylineModel(3pm) User Contributed Perl Documentation Goo::Canvas::PolylineModel(3pm)NAME
Goo::Canvas::PolylineModel - wrapper for GooCanvasPolylineModel
HIERARCHY
Glib::Object
+----Goo::Canvas::ItemModelSimple
+----Goo::Canvas::PolylineModel
INTERFACES
Goo::Canvas::ItemModel
METHODS
itemmodel = Goo::Canvas::PolylineModel->new ($parent, $close_path, $points, ...)
o $parent (Goo::Canvas::ItemModel)
o $close_path (boolean)
o $points (arrayref) The points is an array reference that contains a flat points coordinates. If you want create a polyline without
points, pass an empty array refer or undef.
o ... (list)
itemmodel = Goo::Canvas::PolylineModel->new_line ($parent, $x1, $y1, $x2, $y2, ...)
o $parent (Goo::Canvas::ItemModel)
o $x1 (double)
o $y1 (double)
o $x2 (double)
o $y2 (double)
o ... (list)
PROPERTIES
'arrow-length' (double : default 5 : readable / writable)
The length of the arrows, as a multiple of the line width
'arrow-tip-length' (double : default 4 : readable / writable)
The length of the arrow tip, as a multiple of the line width
'arrow-width' (double : default 4 : readable / writable)
The width of the arrows, as a multiple of the line width
'close-path' (boolean : default false : readable / writable)
If the last point should be connected to the first
'end-arrow' (boolean : default false : readable / writable)
If an arrow should be displayed at the end of the polyline
'height' (double : default 0 : readable / writable)
The height of the polyline
'points' (Goo::Canvas::Points : default undef : readable / writable)
The array of points
'start-arrow' (boolean : default false : readable / writable)
If an arrow should be displayed at the start of the polyline
'width' (double : default 0 : readable / writable)
The width of the polyline
'x' (double : default 0 : readable / writable)
The x coordinate of the left-most point of the polyline
'y' (double : default 0 : readable / writable)
The y coordinate of the top-most point of the polyline
SEE ALSO
Glib::Object, Goo::Canvas::ItemModelSimple
COPYRIGHT
Copyright (C) 2011 Gtk2-Perl Team
perl v5.14.2 2011-11-16 Goo::Canvas::PolylineModel(3pm)