bourne shell programming help!


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers bourne shell programming help!
# 1  
Old 11-27-2005
bourne shell programming help!

hey,

i have 2 files... orders and products

how do i do calculations on the order using the products ?

say if the products file is:

a123:shirt:10.00
zz123:nice shirt:19.95

and the order file is:

05/08/30 a123 10

zz123 3

Jun-3-1994 a123 2

2005.06.23 a123 2

how do i do the calculation using a shell script ??
# 2  
Old 11-27-2005
Our rules state: "(6) Do not post classroom or homework problems." And I have to say that this looks like homework to me.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Cybersecurity

'Shell Shock' vulnerability in Bourne shell

A severe vulnerability was discovered in Bourne shell. Just google for: bash vulnerability ... for more details. (5 Replies)
Discussion started by: Cochise
5 Replies

2. Shell Programming and Scripting

Bourne shell & Korn shell

Could some one tell me the difference btw Bourne shell and the Kshell? Which is more flexible and reliable in terms of portability and efficiency. When i type the following command .. $ echo $SHELL yields me /bin/sh Does this tells me that I am in Bourne shell. If yes, how can i get... (6 Replies)
Discussion started by: bobby1015
6 Replies

3. Shell Programming and Scripting

Bourne/C shell help

Exercise Five Write a Bourne shell script which: • Professionalism: plan for this from the start. • Has one command line argument. • If the command line argument is a directory then the script should output the number of files in the directory. • If the command line argument is an ordinary... (2 Replies)
Discussion started by: moesom
2 Replies

4. Shell Programming and Scripting

How to activate Korn Shell functionnalities in Bourne Shell

Hi All I have writing a Korn Shell script to execute it on many of our servers. But some servers don't have Korn Shell installed, they use Borne Shell. Some operations like calculation don't work : cat ${file1} | tail -$((${num1}-${num2})) > ${file2} Is it possible to activate Korn Shell... (3 Replies)
Discussion started by: madmat
3 Replies

5. Shell Programming and Scripting

I need to understand the differences between the bash shell and the Bourne shell

I do not claim to be an expert, but I have done things with scripts that whole teams of folks have said can not be done. Of course they should have said we do not have the intestinal fortitude to git-r-done. I have been using UNIX actually HPUX since 1992. Unfortunately my old computer died and... (7 Replies)
Discussion started by: awk_sed_hello
7 Replies

6. Shell Programming and Scripting

Need Bourne shell tutorial

Hello. I need a good & complete Bourne shell tutorial. Please, can anyone help me to find it? Thanks. (1 Reply)
Discussion started by: jag
1 Replies

7. UNIX for Dummies Questions & Answers

Bourne-again shell

Hi guys !! well i'm still new in learning UNIX , and actually i'm still studying it by myself .. anyway, some people told me the Bourne-again shell is a good version of UNIX to work on , and i tried to download yesterday but i didn't know how to start it ...... the ReadMe file associated with... (3 Replies)
Discussion started by: mrsamer
3 Replies

8. Shell Programming and Scripting

bourne shell programming help

hey, i have 2 files... orders and products how do i do calculations on the order using the products ? say if the products file is: a123:shirt:10.00 zz123:nice shirt:19.95 and the order file is: 05/08/30 a123 10 zz123 3 Jun-3-1994 a123 2 2005.06.23 a123 2 (1 Reply)
Discussion started by: ganjakh0r
1 Replies

9. Shell Programming and Scripting

UNix Bourne Shell

i require a utility that identifies all users currently logged into the system. It should create a file called logfile which contains a list of usernames together with a count of how many login sessions they are currently running, for example coc9io : 1 hbh8jd : 3 dg7hy : 1 root : 4 it... (3 Replies)
Discussion started by: peter112
3 Replies

10. UNIX for Advanced & Expert Users

Bourne shell script need help please ?

i have this assignment.. and i mad this script but there is something wrong with it.. if anyone can tell me.. watz going on... i would appreciate it.. tHnX in advance.. count=1 val=$2 op=$1 ans=0 if then if then while do ... (7 Replies)
Discussion started by: dezithug
7 Replies
Login or Register to Ask a Question