Computing.Net > Forums > Unix > help in csh

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

help in csh

Reply to Message Icon

Name: sanyuktasingh
Date: January 8, 2004 at 02:56:29 Pacific
OS: Unix
CPU/Ram: Pentium III
Comment:

Please tell me if there is some for loop that gets autoincremented like perl

for $i(1..10)
{ }



Sponsored Link
Ads by Google

Response Number 1
Name: WilliamRobertson
Date: January 13, 2004 at 15:59:49 Pacific
Reply:

In Korn shell you can do:

while (( ++n <= 10 ))
do
    print $n
done

Or in ksh93,

for (( n >= 0; n <= 10; n++ ))
do
    print $n
done

Does it have to be csh?



0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: help in csh

Time difference calculation in csh www.computing.net/answers/unix/time-difference-calculation-in-csh/7131.html

tab in csh www.computing.net/answers/unix/tab-in-csh/6726.html

Shell Script Help Needed www.computing.net/answers/unix/shell-script-help-needed/2821.html