commit a39b1261ebdcaa688901de0ae2ff91521b0e0947 Author: Job Bautista Date: Mon Sep 14 18:23:21 2020 +0800 first commit diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..7d1cd07 --- /dev/null +++ b/COPYING @@ -0,0 +1,23 @@ + + Eiffel Forum License, version 2 + + 1. Permission is hereby granted to use, copy, modify and/or + distribute this package, provided that: + * copyright notices are retained unchanged, + * any distribution of this package, whether modified or not, + includes this license text. + 2. Permission is hereby also granted to distribute binary programs + which depend on this package. If the binary program depends on a + modified version of this package, you are encouraged to publicly + release the modified version of this package. + +*********************** + +THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT WARRANTY. ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THIS PACKAGE. + +*********************** diff --git a/README b/README new file mode 100644 index 0000000..942b0a4 --- /dev/null +++ b/README @@ -0,0 +1,4 @@ +PECS questionnaire turned into a bash script. + +Version 2 of the Eiffel License applies to the bash script and config/* files. I +don't own the copyright on the questions/* files. diff --git a/config/1 b/config/1 new file mode 100644 index 0000000..9685da4 --- /dev/null +++ b/config/1 @@ -0,0 +1 @@ +Never diff --git a/config/2 b/config/2 new file mode 100644 index 0000000..a2a8eaf --- /dev/null +++ b/config/2 @@ -0,0 +1 @@ +Rarely diff --git a/config/3 b/config/3 new file mode 100644 index 0000000..eed8bc8 --- /dev/null +++ b/config/3 @@ -0,0 +1 @@ +Sometimes diff --git a/config/4 b/config/4 new file mode 100644 index 0000000..c88004d --- /dev/null +++ b/config/4 @@ -0,0 +1 @@ +Usually diff --git a/config/5 b/config/5 new file mode 100644 index 0000000..099126f --- /dev/null +++ b/config/5 @@ -0,0 +1 @@ +Always diff --git a/config/score10name b/config/score10name new file mode 100644 index 0000000..32ab6c1 --- /dev/null +++ b/config/score10name @@ -0,0 +1 @@ +Self-confidence diff --git a/config/score1name b/config/score1name new file mode 100644 index 0000000..2b7f9f4 --- /dev/null +++ b/config/score1name @@ -0,0 +1 @@ +Opportunity seeking diff --git a/config/score2name b/config/score2name new file mode 100644 index 0000000..36aab5a --- /dev/null +++ b/config/score2name @@ -0,0 +1 @@ +Persistence diff --git a/config/score3name b/config/score3name new file mode 100644 index 0000000..0e1b1ec --- /dev/null +++ b/config/score3name @@ -0,0 +1 @@ +Commitment to work contract diff --git a/config/score4name b/config/score4name new file mode 100644 index 0000000..4ab3a18 --- /dev/null +++ b/config/score4name @@ -0,0 +1 @@ +Demand for efficiency and quality diff --git a/config/score5name b/config/score5name new file mode 100644 index 0000000..675a31c --- /dev/null +++ b/config/score5name @@ -0,0 +1 @@ +Risk-taking diff --git a/config/score6name b/config/score6name new file mode 100644 index 0000000..b1c31d7 --- /dev/null +++ b/config/score6name @@ -0,0 +1 @@ +Goal setting diff --git a/config/score7name b/config/score7name new file mode 100644 index 0000000..1db6e4f --- /dev/null +++ b/config/score7name @@ -0,0 +1 @@ +Information seeking diff --git a/config/score8name b/config/score8name new file mode 100644 index 0000000..4e0c55c --- /dev/null +++ b/config/score8name @@ -0,0 +1 @@ +Systematic planning and monitoring diff --git a/config/score9name b/config/score9name new file mode 100644 index 0000000..97d1541 --- /dev/null +++ b/config/score9name @@ -0,0 +1 @@ +Persuasion and networking diff --git a/config/testname b/config/testname new file mode 100644 index 0000000..8217d91 --- /dev/null +++ b/config/testname @@ -0,0 +1 @@ +Personal Entrepreneurial Competencies Self-rating Questionnaire diff --git a/questions/1 b/questions/1 new file mode 100644 index 0000000..907367c --- /dev/null +++ b/questions/1 @@ -0,0 +1 @@ +I look for things that need to be done. diff --git a/questions/10 b/questions/10 new file mode 100644 index 0000000..e771ae1 --- /dev/null +++ b/questions/10 @@ -0,0 +1 @@ +I feel confident that I will succeed at whatever I try to do. diff --git a/questions/11 b/questions/11 new file mode 100644 index 0000000..b6addd3 --- /dev/null +++ b/questions/11 @@ -0,0 +1 @@ +No matter whom I'm talking to, I'm a good listener. diff --git a/questions/12 b/questions/12 new file mode 100644 index 0000000..2545a7e --- /dev/null +++ b/questions/12 @@ -0,0 +1 @@ +I do things that need to be done before being asked to by others. diff --git a/questions/13 b/questions/13 new file mode 100644 index 0000000..dfb2188 --- /dev/null +++ b/questions/13 @@ -0,0 +1 @@ +I try several times to get people to do what I would like them to do. diff --git a/questions/14 b/questions/14 new file mode 100644 index 0000000..1b8ca97 --- /dev/null +++ b/questions/14 @@ -0,0 +1 @@ +I keep the promises I make. diff --git a/questions/15 b/questions/15 new file mode 100644 index 0000000..338fb83 --- /dev/null +++ b/questions/15 @@ -0,0 +1 @@ +My own work is better than that of other people work with. diff --git a/questions/16 b/questions/16 new file mode 100644 index 0000000..3b426ed --- /dev/null +++ b/questions/16 @@ -0,0 +1 @@ +I don't try something new without making sure I will succeed. diff --git a/questions/17 b/questions/17 new file mode 100644 index 0000000..8674b85 --- /dev/null +++ b/questions/17 @@ -0,0 +1 @@ +It's a waste of time to worry about what to do with your life. diff --git a/questions/18 b/questions/18 new file mode 100644 index 0000000..da99578 --- /dev/null +++ b/questions/18 @@ -0,0 +1,2 @@ +I seek the advice of people who know a lot about the tasks I am +working in. diff --git a/questions/19 b/questions/19 new file mode 100644 index 0000000..ee6ccb9 --- /dev/null +++ b/questions/19 @@ -0,0 +1,2 @@ +I think about the advantages and disadvantages or different ways of +accomplishing things. diff --git a/questions/2 b/questions/2 new file mode 100644 index 0000000..aef4bb8 --- /dev/null +++ b/questions/2 @@ -0,0 +1,2 @@ +When I am faced with a difficult problem, I spend a lot of time trying +to find a solution. diff --git a/questions/20 b/questions/20 new file mode 100644 index 0000000..1aa94b8 --- /dev/null +++ b/questions/20 @@ -0,0 +1 @@ +I do not spend much time thinking how to influence others. diff --git a/questions/21 b/questions/21 new file mode 100644 index 0000000..16aa766 --- /dev/null +++ b/questions/21 @@ -0,0 +1 @@ +I change my mind if others disagree strongly with me. diff --git a/questions/22 b/questions/22 new file mode 100644 index 0000000..b8e908d --- /dev/null +++ b/questions/22 @@ -0,0 +1 @@ +I feel resentful when I don't get my way. diff --git a/questions/23 b/questions/23 new file mode 100644 index 0000000..5779f59 --- /dev/null +++ b/questions/23 @@ -0,0 +1 @@ +I like challenges and new opportunities. diff --git a/questions/24 b/questions/24 new file mode 100644 index 0000000..4c05d12 --- /dev/null +++ b/questions/24 @@ -0,0 +1,2 @@ +When something gets in the way of what I'm trying to do, I keep on +trying to accomplish what I want. diff --git a/questions/25 b/questions/25 new file mode 100644 index 0000000..9ba64c4 --- /dev/null +++ b/questions/25 @@ -0,0 +1,2 @@ +I am happy to do someone else's work if necessary, to get the job done +on time. diff --git a/questions/26 b/questions/26 new file mode 100644 index 0000000..ea49f35 --- /dev/null +++ b/questions/26 @@ -0,0 +1 @@ +It bothers me when my time is wasted. diff --git a/questions/27 b/questions/27 new file mode 100644 index 0000000..20e148b --- /dev/null +++ b/questions/27 @@ -0,0 +1,2 @@ +I weigh my chances of succeeding or failing before I decide to do +something. diff --git a/questions/28 b/questions/28 new file mode 100644 index 0000000..4ca40ec --- /dev/null +++ b/questions/28 @@ -0,0 +1,2 @@ +The more specific I can be about what I want out of life, the more +chances I have to succeed. diff --git a/questions/29 b/questions/29 new file mode 100644 index 0000000..d7dd410 --- /dev/null +++ b/questions/29 @@ -0,0 +1 @@ +I take action without wasting time gathering information. diff --git a/questions/3 b/questions/3 new file mode 100644 index 0000000..9bfe0a5 --- /dev/null +++ b/questions/3 @@ -0,0 +1 @@ +I complete my work on time. diff --git a/questions/30 b/questions/30 new file mode 100644 index 0000000..c4117a6 --- /dev/null +++ b/questions/30 @@ -0,0 +1,2 @@ +I try to think of all the problems I may encounter and plan what to do +if each problem occurs. diff --git a/questions/31 b/questions/31 new file mode 100644 index 0000000..0ae850e --- /dev/null +++ b/questions/31 @@ -0,0 +1 @@ +I get important people to help me accomplish my goals. diff --git a/questions/32 b/questions/32 new file mode 100644 index 0000000..f076cec --- /dev/null +++ b/questions/32 @@ -0,0 +1 @@ +When trying something challenging, I feel confident that I will succeed. diff --git a/questions/33 b/questions/33 new file mode 100644 index 0000000..cc8572c --- /dev/null +++ b/questions/33 @@ -0,0 +1 @@ +I prefer activities that I know well and with which I am comfortable. diff --git a/questions/34 b/questions/34 new file mode 100644 index 0000000..942193f --- /dev/null +++ b/questions/34 @@ -0,0 +1 @@ +When faced with major difficulties, I quickly go on to other things. diff --git a/questions/35 b/questions/35 new file mode 100644 index 0000000..ed48da7 --- /dev/null +++ b/questions/35 @@ -0,0 +1,2 @@ +When I am doing a job for someone, I make a special effort to make sure +that person is happy with my work. diff --git a/questions/36 b/questions/36 new file mode 100644 index 0000000..0038e79 --- /dev/null +++ b/questions/36 @@ -0,0 +1 @@ +In the past, I have had failures. diff --git a/questions/37 b/questions/37 new file mode 100644 index 0000000..3b620f0 --- /dev/null +++ b/questions/37 @@ -0,0 +1,2 @@ +I am never entirely happy with the way things are done; I always think +there must be a better way. diff --git a/questions/38 b/questions/38 new file mode 100644 index 0000000..b934296 --- /dev/null +++ b/questions/38 @@ -0,0 +1 @@ +I do things that are risky. diff --git a/questions/39 b/questions/39 new file mode 100644 index 0000000..1733bb5 --- /dev/null +++ b/questions/39 @@ -0,0 +1 @@ +I have a very clear plan for my life. diff --git a/questions/4 b/questions/4 new file mode 100644 index 0000000..7992b1d --- /dev/null +++ b/questions/4 @@ -0,0 +1 @@ +It bothers me when things are not done very well. diff --git a/questions/40 b/questions/40 new file mode 100644 index 0000000..1ac1d2d --- /dev/null +++ b/questions/40 @@ -0,0 +1,2 @@ +When working on a project for someone, I ask many questions to be sure +I understand what that person wants. diff --git a/questions/41 b/questions/41 new file mode 100644 index 0000000..e6653e4 --- /dev/null +++ b/questions/41 @@ -0,0 +1,2 @@ +I deal with problems as they arise, rather than spend time trying to +anticipate them. diff --git a/questions/42 b/questions/42 new file mode 100644 index 0000000..01f1133 --- /dev/null +++ b/questions/42 @@ -0,0 +1 @@ +In order to reach my goals, I think of solutions that benefit. diff --git a/questions/43 b/questions/43 new file mode 100644 index 0000000..fd5c8ce --- /dev/null +++ b/questions/43 @@ -0,0 +1 @@ +I do very good work. diff --git a/questions/44 b/questions/44 new file mode 100644 index 0000000..10ea86d --- /dev/null +++ b/questions/44 @@ -0,0 +1 @@ +There have been occasions when I took advantage of someone. diff --git a/questions/45 b/questions/45 new file mode 100644 index 0000000..8f7af0e --- /dev/null +++ b/questions/45 @@ -0,0 +1 @@ +I try things that are very new and different from what I have done before. diff --git a/questions/46 b/questions/46 new file mode 100644 index 0000000..6f444fc --- /dev/null +++ b/questions/46 @@ -0,0 +1,2 @@ +I try several ways to overcome things that get in the way of reaching +my goals. diff --git a/questions/47 b/questions/47 new file mode 100644 index 0000000..12024e2 --- /dev/null +++ b/questions/47 @@ -0,0 +1,2 @@ +My family and personal life are more important to me than work deadlines +I set for myself. diff --git a/questions/48 b/questions/48 new file mode 100644 index 0000000..f339eb8 --- /dev/null +++ b/questions/48 @@ -0,0 +1 @@ +I find ways to complete tasks faster at work and at home. diff --git a/questions/49 b/questions/49 new file mode 100644 index 0000000..42c6d45 --- /dev/null +++ b/questions/49 @@ -0,0 +1 @@ +I do things that others consider risky. diff --git a/questions/5 b/questions/5 new file mode 100644 index 0000000..e3225da --- /dev/null +++ b/questions/5 @@ -0,0 +1,2 @@ +I prefer situations in which I can control the outcomes as much as +possible. diff --git a/questions/50 b/questions/50 new file mode 100644 index 0000000..86cc0d9 --- /dev/null +++ b/questions/50 @@ -0,0 +1,2 @@ +I am as concerned about meeting my weekly goals as I am for my yearly +goals. diff --git a/questions/51 b/questions/51 new file mode 100644 index 0000000..9edd7d7 --- /dev/null +++ b/questions/51 @@ -0,0 +1,2 @@ +I go to several different sources to get information for tasks or +projects. diff --git a/questions/52 b/questions/52 new file mode 100644 index 0000000..41a4f55 --- /dev/null +++ b/questions/52 @@ -0,0 +1 @@ +If one approach to a problem does not work, I think of another approach. diff --git a/questions/53 b/questions/53 new file mode 100644 index 0000000..998ca98 --- /dev/null +++ b/questions/53 @@ -0,0 +1,2 @@ +I am able to get people who have strong opinions or ideas to change +their minds. diff --git a/questions/54 b/questions/54 new file mode 100644 index 0000000..3288297 --- /dev/null +++ b/questions/54 @@ -0,0 +1 @@ +I stick with my decisions even if others disagree strongly with me. diff --git a/questions/55 b/questions/55 new file mode 100644 index 0000000..6978bbb --- /dev/null +++ b/questions/55 @@ -0,0 +1 @@ +When I don't know something, I don't mind admitting it. diff --git a/questions/6 b/questions/6 new file mode 100644 index 0000000..0cc56f5 --- /dev/null +++ b/questions/6 @@ -0,0 +1 @@ +I like to think about the future. diff --git a/questions/7 b/questions/7 new file mode 100644 index 0000000..bee49eb --- /dev/null +++ b/questions/7 @@ -0,0 +1,2 @@ +When starting a new task or project, I gather a great deal of +information before going ahead. diff --git a/questions/8 b/questions/8 new file mode 100644 index 0000000..68572bb --- /dev/null +++ b/questions/8 @@ -0,0 +1 @@ +I plan a large project by breaking it down into smaller tasks. diff --git a/questions/9 b/questions/9 new file mode 100644 index 0000000..46bde69 --- /dev/null +++ b/questions/9 @@ -0,0 +1 @@ +I get others to support my recommendations. diff --git a/test b/test new file mode 100755 index 0000000..0aa1cd7 --- /dev/null +++ b/test @@ -0,0 +1,108 @@ +#!/bin/bash +# +# Copyright 2020, Job Bautista +# Licensed under the Eiffel Forum License 2. +# See the COPYING file for the full license text. + +question=1 + +programdone () { + echo "Program done. Exiting." + exit + } + +echo "Welcome to the" `cat config/testname`. +echo "Read each statement carefully and answer honestly based on how well" +echo "it describes you. There are five choices. Enter the number you selected." +echo "---------------------------------------------------------------------------" + +echo "5="`cat config/5` +echo "4="`cat config/4` +echo "3="`cat config/3` +echo "2="`cat config/2` +echo "1="`cat config/1` + + +read -p "Ready? (y/yes to proceed, anything else to exit): " ready +case $ready in + "yes" | "YES" | "Yes" | "y" | "Y") + while [ $question -le 55 ] + do + echo "$question." `cat questions/$question` + read -p "Answer: " num$question + ((question++)) + done + ;; + *) + programdone + ;; +esac + +score1pre=$((num1 + num12 + num23 - num34 + num45)) +score2pre=$((num2 + num13 + num24 - num35 + num46)) +score3pre=$((num3 + num14 + num25 + num36 - num47)) +score4pre=$((num4 + num15 + num26 + num37 - num48)) +score5pre=$((num5 - num16 + num27 + num38 + num49)) +score6pre=$((num6 - num17 + num28 + num39 + num50)) +score7pre=$((num7 + num18 - num29 + num40 + num51)) +score8pre=$((num8 + num19 + num30 - num41 + num52)) +score9pre=$((num9 - num20 + num31 + num42 + num53)) +score10pre=$((num10 - num21 + num32 + num43 + num54)) +correctionpre=$((num11 - num22 - num33 - num44 + num55)) +correction=$((correctionpre+18)) +score1=$((score1pre+6)) +score2=$((score2pre+6)) +score3=$((score3pre+6)) +score4=$((score4pre+6)) +score5=$((score5pre+6)) +score6=$((score6pre+6)) +score7=$((score7pre+6)) +score8=$((score8pre+6)) +score9=$((score9pre+6)) +score10=$((score10pre+6)) +echo "---------------------------------------------------------------------------" +echo "Results (without correction):" +echo `cat config/score1name` "= $score1" +echo `cat config/score2name` "= $score2" +echo `cat config/score3name` "= $score3" +echo `cat config/score4name` "= $score4" +echo `cat config/score5name` "= $score5" +echo `cat config/score6name` "= $score6" +echo `cat config/score7name` "= $score7" +echo `cat config/score8name` "= $score8" +echo `cat config/score9name` "= $score9" +echo `cat config/score10name` "= $score10" +echo "Correction Factor = $correction" + +if [ $correction -le 19 ] +then + programdone +else + case $correction in + 24 | 25) + subtract=7 + ;; + 22 | 23) + subtract=5 + ;; + 20 | 21) + subtract=3 + ;; + *) + echo "This shouldn't happen. Either you inputted a number greater than 5, or this is a bug." + programdone + ;; + esac + echo "---------------------------------------------------------------------------" + echo "Results (with correction):" + echo $((score1 - subtract)) + echo $((score2 - subtract)) + echo $((score3 - subtract)) + echo $((score4 - subtract)) + echo $((score5 - subtract)) + echo $((score6 - subtract)) + echo $((score7 - subtract)) + echo $((score8 - subtract)) + echo $((score9 - subtract)) + echo $((score10 - subtract)) +fi