Sponsored Content
Full Discussion: bourne if, then, else
Top Forums UNIX for Dummies Questions & Answers bourne if, then, else Post 11782 by thangorn on Wednesday 12th of December 2001 03:15:31 AM
Old 12-12-2001
read $line
case $line in
'K')
Something ;;
'H')
Something ;;
*)
Something else ;;
esac


try something like this
thangorn
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

bourne script help

I need to make a small script that figures out if a filename that the user enters is a file or a directory. and if it is a directory, how many files are in it. please point me to the right direction, I am a newbie at this. (1 Reply)
Discussion started by: Heedunk
1 Replies

2. UNIX for Dummies Questions & Answers

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

3. 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

4. Shell Programming and Scripting

Bourne Script help

Hey guys, I am trying to do a bourne script to look for c files in the current directory. I had it working where it finds the files and asks you to delete them or not, which works, but if there i no files, then it comes up with errors, which iam trying to get rid of. So I thought I would do a if... (2 Replies)
Discussion started by: Pits
2 Replies

5. 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

6. Shell Programming and Scripting

Bourne and decimals??

I need to get 15% of the variable exer1 to be added to other exercises so far, i've got exer1=$1 aver=`expr $exer \* .15` but i keep getting an error that an integer value was expected. Is there anyway around this? (1 Reply)
Discussion started by: kdyzsa
1 Replies

7. Shell Programming and Scripting

GREP in Bourne

I have a problem. Suppose I have a log transport.log with the ff: >> tp finished with return code: 203 meaning: wrong syntax in tp call << I'm working on creating a script to find out if there are error are not. Unfortunately, the only way to check if there is error is if the return... (3 Replies)
Discussion started by: kdyzsa
3 Replies

8. Shell Programming and Scripting

help with bourne script

Hey guys not sure why but when i execute the script i get the correct result but then it says command not found not sure why can anyone see anything wrong with my code below? I just want to print how much quota i have used in my home directory #!bin/sh `quota -v | grep ^/home | awk... (2 Replies)
Discussion started by: musicmancanora4
2 Replies

9. Shell Programming and Scripting

help with bourne shell script

Attempting to write a script to eventually notify me via email for when there is packetloss across the backbone. I am looking for values greater than 0% in the mtr field. #!/bin/sh target=www.google.com date +"%D"_"%T" >> /home/rich/mtr.log echo "----------------------------------------" >>... (1 Reply)
Discussion started by: closedown
1 Replies

10. 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
line(1)                                                            User Commands                                                           line(1)

NAME
line - read one line SYNOPSIS
line DESCRIPTION
The line utility copies one line (up to and including a new-line) from the standard input and writes it on the standard output. It returns an exit status of 1 on EOF and always prints at least a new-line. It is often used within shell files to read from the user's terminal. EXIT STATUS
Exit status is: 0 Successful completion >0 End-of-file on input. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
sh(1), read(2), attributes(5) SunOS 5.10 1 Feb 1995 line(1)
All times are GMT -4. The time now is 10:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy