![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A simple (?) loop | red baron | Shell Programming and Scripting | 2 | 07-10-2008 03:58 PM |
| a simple loop in csh | dsstamps | UNIX for Dummies Questions & Answers | 1 | 05-22-2008 04:03 AM |
| simple while loop | ali560045 | Shell Programming and Scripting | 10 | 12-26-2007 10:44 AM |
| simple for loop | ali560045 | Shell Programming and Scripting | 3 | 12-17-2007 01:39 AM |
| a simple while loop | syno | Shell Programming and Scripting | 5 | 04-08-2006 07:45 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Simple using For loop
Hi expert,
I'm using csh Code: #!/bin/csh set x = 0 set number = `awk '{array[NR]=$0} END {print array[x];}'` i want to use for loop to store data to $number repeatly untill x = 23 How to use c shell for loop? |
|
||||
|
Thks.
But i cant use that way cox i have 2 file. FIRST file contain 15 16 17 SECOND file contain 40 46 48 code is :- set A = `awk '{print $1}' FIRST |awk '{array[NR]=$0} END {print array[x];}'` set B = `awk '{print $1}' SECOND |awk '{array[NR]=$0} END {print array[x];}'` set C = `expr $A \* 2 + $B` echo "$C" and i wan get outcome is: - 70 78 82 There is another way to edit or nt? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|