![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help me in sending parameters from sqlplus script to unix shell script | Hara | Shell Programming and Scripting | 2 | 01-29-2008 12:31 PM |
| Shell Script: want to insert values in database when update script runs | ring | Shell Programming and Scripting | 1 | 10-25-2007 12:06 AM |
| here document to automate perl script that call script | hogger84 | Shell Programming and Scripting | 3 | 10-22-2007 07:15 AM |
| returning to the parent shell after invoking a script within a script | gurukottur | Shell Programming and Scripting | 5 | 09-26-2006 04:05 AM |
| return valuse from child script to parent script | borncrazy | Shell Programming and Scripting | 1 | 08-20-2004 12:39 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
even odd script
I need a unix script that check for even or odd. EXAMPLE::::
please enter the number to check: 12 the output: This is an even number it has to have prompts. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
So,
this is your first post!!! Welcome to the Forum... what have you tried so far regarding the problem you had posted here is something you can start with ... Code:
# !/usr/bin/ksh echo "Input number" read number < /dev/tty if [ $(($number % 2)) -eq 0 ] then echo "$number is even" else echo "$number is odd" fi exit 0 |
|
#3
|
|||
|
|||
|
1 more plz
Thanks guys.
Hey 2 more. Iwant to input a file and i want it to tell me 3 trhings EXAMPLE::: INPUT: HW1 I can read the file HW1 I can write the file HW1 I cant execute the file HW1 |
|||
| Google The UNIX and Linux Forums |