![]() |
|
|
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 |
| Why not a segmentation fault?? | lagigliaivan | High Level Programming | 22 | 05-21-2008 12:07 PM |
| File Transfer that is not so trivial I guess | Legend986 | UNIX for Dummies Questions & Answers | 1 | 03-07-2008 05:40 AM |
| Segment Fault | zhshqzyc | High Level Programming | 9 | 04-07-2006 12:47 PM |
| memory fault | iwbasts | High Level Programming | 1 | 03-21-2006 04:15 AM |
| Need help for a simple script (i guess so...) | HowardIsHigh | UNIX for Dummies Questions & Answers | 1 | 07-01-2003 11:19 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
guess the fault :)
I really cant understand whats wrong with this:
File looks like this: 55 11 Code: cost=30 a= cut -c9-12 File let a=${a}+${cost} echo $a The answer echo should echo 11+30(cost) however the output looks like this: 11 30 And also is there anyway to grep $2 without awk? or maybe awk grep $2? wouldnt mind get this loop to work instead ![]() for i in cut -c1-12 awk ' $2 ~ "^[0-9]" && $2 > 0 {$2='$i'} ' 5 ` ![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|