![]() |
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 |
| X trouble | izua | UNIX for Dummies Questions & Answers | 0 | 01-03-2007 06:19 PM |
| Trouble with tr | Mike@Work | SUN Solaris | 8 | 08-10-2006 03:04 PM |
| The trouble about SU ... | nulnul7 | UNIX for Dummies Questions & Answers | 4 | 10-05-2005 11:39 AM |
| The trouble with... | zazzybob | What's on Your Mind? | 6 | 01-18-2005 06:01 AM |
| trouble | awk | UNIX Desktop for Dummies Questions & Answers | 1 | 11-22-2002 10:51 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Trouble with awk
This is probably a fairly simple question but I cant seem to get it to work.
Im trying to multiply an entire column in a file by a variable in my bash script but just cant seem to get it to work with awk. Here is what I'm trying $varr is some value $line is my file awk '{print $1,$2*$varr}' $varr "$line" It seems to print the $2*$varr 'th column instead of multiplying the $2 column by $varr I've also tried such things as awk -v $varr the the rest of the stuff above, nothing seems to work.? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|