Sponsored Content
Full Discussion: Improving code
Top Forums Shell Programming and Scripting Improving code Post 302991056 by RudiC on Monday 6th of February 2017 08:28:12 AM
Old 02-06-2017
I was about to ask the same as zaxxon did, as I'm surprised that none of the help given in the past seems to have fallen on fertile ground. Until a decent answer is posted, I'll withhold the "one single awk" proposal I came up with.
These 4 Users Gave Thanks to RudiC For This Post:
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

improving my script

Hi; I want to access our customer database to retreive all clients that have as language index 2 or 3 and take their client number. My input is a file containing all client numbers. i access the data base using a function call "scpshow". The total number of clients i want to scan is 400 000... (6 Replies)
Discussion started by: bcheaib
6 Replies

2. UNIX for Dummies Questions & Answers

Improving Unix Skills

Kindly any advice to improve my unix skills as electronic books i can download or valuable sites as this one etc... (3 Replies)
Discussion started by: sak900354
3 Replies

3. Shell Programming and Scripting

Improving this validate function

Hi guys, I use this function which was provided to me by someone at this site. It works perfectly for validating a users input option against allowed options.. example: validateInput "1" "1 3 4 5" would return 0 (success) function validateInput { input=$1 allowedInput=$2 for... (4 Replies)
Discussion started by: pyscho
4 Replies

4. Shell Programming and Scripting

Improving code by using associative arrays

I have the following code, and I am changing it to #!/bin/bash hasArgumentCModInfile=0 hasArgumentSrcsInfile=0 hasArgumentRcvsInfile=0 OLDIFS="$IFS" IFS="|=" # IFS controls splitting. Split on "|" and "=", not whitespace. set -- $* # Set the positional... (3 Replies)
Discussion started by: kristinu
3 Replies

5. Shell Programming and Scripting

Basic help improving for in loop

I'm obviously very new to this. I'm trying to write a simple for loop that will read the directory names in /Users and then copy a file into the same subdir in each user directory. I have this, and it works but it isn't great. #!/bin/bash HOMEDIRS=/Users/* for dirs in $HOMEDIRS; do if ];... (5 Replies)
Discussion started by: Heath_T
5 Replies

6. Shell Programming and Scripting

Need help improving my script.

Thank you for taking the time to look at this and provide input. To start, I am not a linux/unix expert but I muddle through the best I can. I am also in no way shape or form a programmer. Please keep that in mind as you read this script. This script is designed to find all files in a given... (8 Replies)
Discussion started by: garlandxj11
8 Replies
cycle(1)                                                               Utils                                                              cycle(1)

NAME
cycle - a calendar for women SYNOPSIS
cycle DESCRIPTION
Cycle is a calendar program for women. Given a cycle length or statistics for several periods, it can calculate the days until menstrua- tion, the days of "safe" sex, the fertile period, and the days to ovulations, and define the d.o.b. (date of birth) of a child. It allows the user to write notes and helps to supervise the reception of hormonal contraceptive tablets. FEATURES
The program is capable of: - Calculate of the days of menstruation, based on length of the cycle or on statistics of a period. - Calculate the "safe" sex days, fertile period and day to ovulations - Definition of D.O.B . (Date Of Birth) of a child - Allows to write notes - Helps to supervise reception of hormonal contraceptive tablets HOW DOES IT WORK
It uses the calendar method for the definition of fertile days. For this is necessary to determine duration, at least, of last six cycles. For determine the fertile days it uses this algoritm: - First day: duration of shortest cycle minus 18 - Last day: duration of longest cycle minus 11 - Ovulation: is considered in the middle of fertile period (Determine the exact day isn't possible with the calendar method) Date of a birth of the child is counted from the beginning of last menstruation (in obstetrics are accepted 40 weeks). This date is cor- rected with the duration of a cycle (are subtracted or added same number of days that a cycle differs from 28 days). Is possible check the results at: http://cir.msk.ru/sroki.shtml (in Russian) USAGE
It is necessary to mark the beginning of menstruation. This is possible clicking with the right button on the date and chosing "The begin- ning of a cycle". Similarly the mark can be removed. Using duration of last six cycles, the program will calculate - Fertile period - green cells - Ovulation day (the middle fertile period) - brightly green cell - Beginning of following menstruation - pink cells Cycle duration is set in options or is calculated an average of last six periods. To determine prospective date of a birth of the child, it is necessary first day of last cycle to mark in addition as "Pregnancy". Depending on your purposes, you can display only "Safe" sex days or only fertile days. Information about interesting day can be received clicking with left button. Is possible adding a note to any date using corresponding item of the menu. Day with a note are underlined. It is necessary to note that factor of failures of calendar contraception method is about 10 percent. This method is suitable only for women with enough regular cycle. If your doctor has recommended hormonal contraceptive this program will help to supervise their reception. Closely familiarize with the instruction applied to the chosen preparation. Packing can contain 21 tablet (the circuit of reception 21 day on one tablet, then 7 days pause) or 28 tablets in this case all tablets are accepted without interruption every day of 28. In the program, is marked only day of reception of each first tablet of packing. NOTE: This program is not a reliable contraceptive method. It does neither help to prevent sexual transmision diseases like AIDS. It is just an electronic means of keeping track of some of your medical data and extract some statistical conclusions from them. You cannot con- sider this program as a substitute for your gynecologist in any way. FILES
~/.cycle This is the directory where cycle stores the data. AUTHOR
cycle was written by Oleg S. Gints. This manual page was written for Debian by Miriam Ruiz <little_miry@yahoo.es>. SEE ALSO
You can find cycle's home page at: http://cycle.sourceforge.net/ More information about calendar method are available at: http://www.mama.ru/gynecolog/STA/st18.htm (in Russian) Miriam Ruiz 6 April 2005 cycle(1)
All times are GMT -4. The time now is 02:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy