Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Can Any help me with the math on this shell script? Post 302266668 by knp808 on Wednesday 10th of December 2008 06:26:33 PM
Old 12-10-2008
i1000:TRINITY:JOAN K:92:92:93:90
1001:BLUMOFF:SAM Q:66:74:94:67
1002:PARTNEY:V C:84:82:100:50
1003:GRANT:RICK R:94:93:99:92
1004:TIPTON:FRED J:65:65:50:63
1005:KELSO:MIKE K:65:55:66:25
1006:STAGNER JR:DON K:85:95:97:87
1007:DONOVAN:CHESTER U:58:62:98:58
1008:MURRAY:TOM S:49:49:60:45
1009:SCHMALTZ:THEODORE:82:95:95:87
1010:MARTIN:WILBUR M:64:74:95:69
1011:HAFFER:LAURA S:72:75:96:70
1012:HALL:EDWARD C:64:65:99:66
1013:MONROE:PAT E:95:92:100:96
1014:BATES:MIKE W:83:92:96:88
1015:MILLMAN:MITCHELL H:67:71:98:68
1016:YOUNG:CLARK O:83:81:100:86
1017:BLAIR:JOHN P:65:73:93:68
1018:KING:PAT O:84:85:99:86
1019:MOORE:TED A:73:73:92:71
1020:DUFFY:GAIL H:57:51:98:54
1021:REINBERG:RON V:65:75:97:68
1022:GREWE:PAT E:73:84:94:77
1023:CLINTON:JOE A:84:94:92:88
1024:ELLIS:LEE E:64:65:94:63
1025:GRISHAM:STAN H:68:64:95:59
1026:GROSS:GENE H:68:51:92:55
1027:GROSSMAN:TIM U:74:81:94:77
1028:GROVE:GRACE O:83:81:95:83
1029:CORBET:LAURIE M:92:94:93:91
1030:WORKS:CINDY E:66:64:95:63
1031:KNEPPER:DON E:59:52:99:56
1032:SHOEMAKE:RHONDA C:67:72:97:67
1033:GULLY:LISA K:66:64:98:61
1034:JOHNSON:LINDA B:51:51:91:49
1035:DEVILLE:VICTOR M:57:51:100:53
1036:MEYER:MIKE D:57:64:91:59
1037:SWARTWOUT:JO I:83:82:98:84
1038:WHEAT:PATTI W:50:52:93:47
1039:CONNORS:STEPHEN X:65:65:98:63
1040:ADAMS:BRUCE X:84:91:99:89
1041:CIRAMI:ALICE N:50:51:94:49
1042:KUMMER:NATALIE P:58:52:91:56
1043:DUBINSKY:JULIE D:94:92:92:95
1044:WEBER:WILLIAM B:58:54:99:56
1045:HAGER:JOE U:65:75:95:67
1046:RISCH:SHARY Q:50:45:60:40
1047:ROWAN:ANGIE D:64:62:92:63
1048:LIENHOP:RICHARD C:50:53:96:49
1049:DANIS:MARK G:65:63:94:60
1050:HALL JR:DON D:93:91:93:94
1051:BREEN:CAROL C:56:53:94:54
1052:DANIELS:ROBERT J:65:65:93:63
1053:RHODES:BECKY N:92:95:96:93
1054:FLACH:JACK F:56:52:100:52
1055:HANNIGAN JR:CAROL:57:53:95:52
1056:WARNER:JAMES P:57:51:93:51
1057:WERNER:MICHELLE F:82:85:96:83
1058:LOVINS:JOLENE C:66:72:99:67
1059:BOIVIN:MARTIN J:56:53:91:53
1060:MEYSTRICK:TERRY H:49:53:93:48
1061:OWINGS:HAROLD P:66:75:99:68
1062:STEWART:VICKI D:84:95:93:88
1063:MCCLELLAN:PAT A:84:91:96:88
1064:HARRIS:NANCY M:81:83:100:82
1065:HARRISON:BRAD F:66:72:96:69
1066:HART:DEBBIE V:58:64:94:58
1067:HILLER:SIDNEY U:75:72:93:75
1068:SMITH:PAUL E:74:73:97:75
1069:TODOROVICH:MARY C:59:63:94:58
1070:HARTWIG:MATT L:72:82:93:79
1071:FOX:JEAN N:93:95:94:93
1072:TOBIN:JOHN Y:93:93:98:91
1073:HARMON:KEVIN U:58:54:95:52
1074:HAUMESSER:JEFF D:75:71:94:75
1075:HAYDEN:MARY R:51:51:100:48
 

10 More Discussions You Might Find Interesting

1. Programming

something about <math.h>

Hi, I got an easy problem for you but really difficult for me 'cause I am pretty new to this field I got header file <math.h> included in my .c file , then I write the code as below: k = sqrt(i); /* both variables k and i are int */ then I cc temp.c it says like this undefined... (4 Replies)
Discussion started by: blf0
4 Replies

2. Shell Programming and Scripting

math help

$ x=1 $ y=1.5 $ z=$((x*y)) bash: 1.5: syntax error: invalid arithmetic operator (error token is ".5") What's wrong? (2 Replies)
Discussion started by: rockbike
2 Replies

3. Shell Programming and Scripting

Script math calculation

Hi Gurus, I'm currently using HP-UX B.11.23. I've a simple calculation script which performs the task below. -> echo "240021344 / 1024 /1024" | bc Output: 228 240021344 is KB value. When I tried to perform the same calculate in Ms Excel, it produces a different result: 228.9021912.... (12 Replies)
Discussion started by: superHonda123
12 Replies

4. Shell Programming and Scripting

A Math problem using shell script

Have a bit complicated math query .. Basically i am given a number which is > 50 .. I am suppose to find the calculation to get a number which is equal or more than the input number and is also a multiple of any number between 20 - 30 . For example . Input number is 60 . Now 20x3 =60 ... (2 Replies)
Discussion started by: greycells
2 Replies

5. Shell Programming and Scripting

Math calculation over shell

Hi I am trying to calculate the rate at which something is happening. I have 2 files- a1 and b1. I want to calculate something like this ((wc -l a1)/(wc -l a1 + wc -l b1))*100 over a loop for different a and b. Is this possible, help me out fellas. Thanks a lot :) (5 Replies)
Discussion started by: jamie_123
5 Replies

6. UNIX for Dummies Questions & Answers

Variables and math in Old skool Bourne Shell

Hey everybody, I've been searching google and these forums and have found some solutions to the issues I've been having today within the OLD Bourne Shell. I am following chapter 6 of the Guide to Unix using Linux 4th Edition. I am working on some basic calculations with variables in the BASH... (3 Replies)
Discussion started by: mr.rhtuner
3 Replies

7. UNIX for Dummies Questions & Answers

How to write Config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

8. Shell Programming and Scripting

How to write config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

9. UNIX for Dummies Questions & Answers

Math

i have file (my_file.txt) that looks like this: 000000000000010000 000000000000010000 000000000000005000 000000000000005000 000000000000005000 000000000000005000 000000000000005000 000000000000005000 000000000000005000 000000000000005000 all said and one, it should look... (11 Replies)
Discussion started by: lawsongeek
11 Replies

10. Shell Programming and Scripting

Shell script for solving the math question

Can such Puzzle solve through UNIX script? if yes, what could be the code? This has been solve in C language. we were trying to solve this through shell but could not because of not able to pass 1st argument with multiple value. we are not expert in unix scripting. Below is the puzzle John is a... (4 Replies)
Discussion started by: anshu ranjan
4 Replies
exit(1)                                                            User Commands                                                           exit(1)

NAME
exit, return, goto - shell built-in functions to enable the execution of the shell to advance beyond its sequence of steps SYNOPSIS
sh exit [n] return [n] csh exit [ ( expr )] goto label ksh *exit [n] *return [n] DESCRIPTION
sh exit will cause the calling shell or shell script to exit with the exit status specified by n. If n is omitted the exit status is that of the last command executed (an EOF will also cause the shell to exit.) return causes a function to exit with the return value specified by n. If n is omitted, the return status is that of the last command exe- cuted. csh exit will cause the calling shell or shell script to exit, either with the value of the status variable or with the value specified by the expression expr. The goto built-in uses a specified label as a search string amongst commands. The shell rewinds its input as much as possible and searches for a line of the form label: possibly preceded by space or tab characters. Execution continues after the indicated line. It is an error to jump to a label that occurs between a while or for built-in command and its corresponding end. ksh exit will cause the calling shell or shell script to exit with the exit status specified by n. The value will be the least significant 8 bits of the specified status. If n is omitted then the exit status is that of the last command executed. When exit occurs when executing a trap, the last command refers to the command that executed before the trap was invoked. An end-of-file will also cause the shell to exit except for a shell which has the ignoreeof option (See set below) turned on. return causes a shell function or '.' script to return to the invoking script with the return status specified by n. The value will be the least significant 8 bits of the specified status. If n is omitted then the return status is that of the last command executed. If return is invoked while not in a function or a '.' script, then it is the same as an exit. On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways: 1. Variable assignment lists preceding the command remain in effect when the command completes. 2. I/O redirections are processed after variable assignments. 3. Errors cause a script that contains them to abort. 4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari- able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not performed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
break(1), csh(1), ksh(1), sh(1), attributes(5) SunOS 5.10 15 Apr 1994 exit(1)
All times are GMT -4. The time now is 05:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy