Search Results

Search: Posts Made By: madhavb
1,669
Posted By agama
This should work for most awk versions: ...
This should work for most awk versions:


awk '{ p *= $1 } END{ print p }' p=1 input-file



For gnu awk, and other recent versions, an alternative:


awk -v p=1 '{ p *= $1 } END{ print p...
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 04:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy