i am passing variables pv,rte,yrs to pgm.
BEGIN {printf ("%4.3f",(pv * rte)^yrs)} #this works passing
pv = 887.10,rte=1.04,yrs=3.
aNS = 1000.this gives future value.
this does not; BEGIN {printf ("%4.3f",(pv / rte)^yrs)}
this should give the original pv(887.10)
using pv = 1000,rte=1.04,yrs=3...
Hi: i currently have awk on my pc but it is giving me trouble. how do i get a current version of awk or gawk or nawk?also how do i install it? i am getting senile and forget what the hell i do sometimes.please be explicit.
thank you.
Hi: finally got awk to work with xp machine.minor glitches
but workable. biggest pain is not being able to retrieve prior command(s).
with win98se i could use the up/down arrows
and get the prior commands.
with xp i can not do this.tried combinations
but to avail...
hi: i managed to get awk95 from at&t working on xp with 2 exceptions:when my window opens i get this message:
(date and time) 9e8=81152:regopen failed.
however i can use awk.
the second is that with win98se i could resize
my window.with xp using a shortcut to...
Hi: i have used awk with win98se. i have a winxp machine and wish to download awk which will work with xp. could someone please provide the site(link) for the download. please be as specific as possible. i wish to have the latest version of awk(gawk,nawk) and i can not remember
what site i got...
Hi; i wish to find files on my hard drive(c:) that have an
extension of .MP3(.mp3).that includes directories and files.
i have tried some things but they do not work.i thought
FILENAME option with some info would get if for me but it does not.i do not want to use "find" in windows.thank you
Hi:I am using awk on my windows machine and it is great.i have a problem when trying to access files with long names:
i.e. c:/Program Files/Abcd/My Folder.the caps are correct and the spaces in the file names are correct.windows stores
the filename as:c\Progra~1\Abcd\Myshar~1 because of the 8...
Hi: i sometimes print to a file on my desktop(windows).the problem is that the file prints with LF(hex 0a) linux style.windows uses a hex(0d 0a--crlf).when printing to a file how can i get the file to print windows style without using a program;if that is possible?P.S. i have a program that will...
I have a variable number of input fields.i wish to output them and have as the last field a line number.i wish the line numbers to be lined up vertically.so that if i have 3 fields or seven fields or whatever,the last field would have the line number(or any other identifier),line up as
if it...
the following,as copied from page 143 of 'awk a programming language' by(AKW) doesn not wish to cooperate.i know it is me but i do not know why.
{ for (i =1; i <= NF; i++)
if ($i ~/^[+-]?([0-9] + [.]?[0-9]*|[.][0-9]+)$/){
stack[++top] = $i
} else if ($i == "+" && top > 1 ) {...
a simple pgm but!!!!
{if ($NF ~ /0-9/) #this is o.k
print($0,"\r"} #this is o.k.
else
print($0,"\t\t\t\t\t# ",FNR,"\r"} #see below.
}
this pgm works fine EXCEPT it will not put a line number(FNR) or # on the print statement with the tabs.it will
put the FNR before and...
Hi: i downloaded perl via perl.com(activeperl-5.8.4.810-mswin32-x86.msi) and it seemed to install o.k.however,i can only access perl via desktop/dos-prompt.the info from perl
text states that usage(path) is:c:\perl\bin\perl.exe.
if i try to use that path i get a dos type window but cannot do...
I have accessed MAN for info concerning protocol.using the KSH shell and trying to experiment with cut/sort, i find that i do not quite understand options and or args.as an example: cut - cut out selected columns or fields of each line of a file
SYNOPSIS
cut [ 1;4options ] [file ...]...
I am using the KORN shell and am using awk experimentally.i have a couple of problems i can't resolve(i am getting better tho).using dos prompt i can recall my prior commands
without having to key again.(F8 + up or down arrow).
i can't seem to do this with a dos/looking KSH.also,when i try to do...
Hi: i read the thread about changing from MS to LINUX.i have tried knoppix and am familiar with unix/linux.the distro of choice will be made later.what i need to know is if or how can i have a WIN and LINUX on same puter.I have a spare 80G drive/a cd-rom/cr-rw/floppy etc.how difficult would it...
Hi:is there a command that will let me append a file to another file after processing the first file?i assume that it will do one record(line at a time).I have checked the sed & awk book and see no append in AWK.thank you.
HI: I am using o'reilly book sed & awk and experimenting with examples in book using DOS and nawk/awk.
Data file:john robinson
koren inc.
978 common ave
boston
ma 01760
696-0987
THIS IS A MULTILINE RECORD WITH 6 FIELDS.
the book shows begin {FS =...
HI;I have been trying to redirect the output of a command to a file; i.e.(cut --help) will display the command structure.I would like to capture tne output of --help to a file.Can it be done?I am using KSH with a dos like command line.Some of the --help output is long so i need a copy to...
I have used various awk pgms with DOS prompt on my puter.
I was told,after various problems,that perhaps the KSH shell would be a better option.I downloaded same.The blurb said that with win9x it would be slow.it is,but that is o.k. when i try to use KSH i get a dos type screen which says "HOME...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.