UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old August 25th, 2004, 04:44 AM
superduper superduper is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: hk
Posts: 4 superduper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
csh - check input value

Hi,

Unluckily I have to use c shell script (but I am not that familiar with c shell), the code I need is as follows :-

1 - Let the user input an integer.
2 - if the user does not type in anything, prompt to him/her to enter an integer.
3 - if the user enters a string(say for "92abc" or "abcd"), prompt to him/her for an integer.
4 - if the user enters an integer, echo the value to screen.

Reply With Quote
  #2  
Old August 25th, 2004, 05:27 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,077 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 13 h 40 m 11 sec
Reputation Power: 8
why do you ' have to use c shell script' ??

Reply With Quote
  #3  
Old August 25th, 2004, 10:51 AM
superduper superduper is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: hk
Posts: 4 superduper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by guggach
why do you ' have to use c shell script' ??


That is one of the requirement from one of my assignment. That's the reason I am looking for fishermen who can handle `sea` shell. Any fishermen there ?

Reply With Quote
  #4  
Old August 27th, 2004, 07:05 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,077 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 13 h 40 m 11 sec
Reputation Power: 8
on the Q: are you stupid ?
i have the alternatives:
- yes
- i don't write c-scripts

Reply With Quote
  #5  
Old August 27th, 2004, 07:10 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,077 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 13 h 40 m 11 sec
Reputation Power: 8
alternatively:
- no
- i write c-scripts

Reply With Quote
  #6  
Old August 27th, 2004, 07:17 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,077 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 13 h 40 m 11 sec
Reputation Power: 8
people making such 'requirements'
should a little study an OS, just 4 char
beginning by lowercase 'u' && and ending by lowercase 'x'
in the middle you find
an 'n' 4 nothing && an 'i' 4 interesting.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > csh - check input value


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway