![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Find cmd not working as expected | Vishal123 | Shell Programming and Scripting | 6 | 08-29-2007 02:11 AM |
| #/usr/bin/csh -f not working as expected? | effigy | Shell Programming and Scripting | 4 | 06-05-2006 05:00 PM |
| ls not working as expected within ksh | GNMIKE | Shell Programming and Scripting | 10 | 07-07-2005 07:53 AM |
| awk not working as expected with BIG files ... | videsh77 | Shell Programming and Scripting | 1 | 02-24-2005 04:15 PM |
| which not working as expected | osee | Shell Programming and Scripting | 2 | 09-07-2004 11:37 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Var substitution in awk - not working as expected
countA=`awk '/X/''{print substr($0,38,1)}' fName | wc -l`
countB=`wc -l fName | awk '{print int($1)}'` echo > temp ratio=`awk -va=$countA -vc=$countB '{printf "%.4f", a/c}' temp` After running script for above I am getting an error as : awk: 0602-533 Cannot find or open file -vc=25. The source line number is 1. Same kind of script is working elsewhere. Not sure why its going wrong. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|