Hi everybody,
I have some difficulties to use awk with the right options (as always): i have for example 3 fields:
IF-MIB::ifIndex.1
IF-MIB::ifIndex.2
IF-MIB::ifIndex.3
i want to use "while" to access to these records one by one
so i wrote this script but it didn t return the right value:... (2 Replies)
hello
does anyone knows how can i reach a parameter in awk command line
for example
p1 f 4
p1 is an awk script. 4 is parameter
i want to work with the second parameter
i know it has something to do with argv command
i just dont know the syntax.
please help. (1 Reply)
mode=$1
psg telnetd | awk current=`date +%M`'{
printf ("mode is %s",mode)
printf ("mode is %s",ARGV)
}'
at command prompt when i run the script along with the argument i get only--
'mode is '
argument is not printed.(If the argument is... (3 Replies)
My task is that when the user calls the script
1. If user calls script with
awk -v dtmax= -v stdlim= -f ../Scripts/add-rgauss-xt.awk fin.xt > fout.xt
rgauss will return mean + (stdlim * sigma)
2. If user calls script with
awk -v dtmax= -f ../Scripts/add-rgauss-xt.awk fin.xt > fout.xt... (4 Replies)
Being new to awk I have a really basic question. It just has to be in the archives but it didn't bite me when I went looking for it.
I've written an awk script, placed it in a file, added the "#!/usr/bin/awk -f" at the top of the script and away I go. "% myAwk <inputfile>" gives me exactly what... (2 Replies)
Hi
I am looking to set-up ISC DHCP to support ipv6, and to migrate my existing SUN DHCP ipv4 to ISC,
finding the ipv4 options for the SUN DHCP options was ok eg
TFTPsrvN = tftp-server-name
OptBootF = bootfile-name
However if I set up a DHCPv6 does anyone know what the equivalent... (0 Replies)
Hi guys,
i'm trying to solve this problem.
I have to run something like
cat file1.txt | awk -f script.awk 10
if i'm in the awk script, how can i take the parameter :10 ??:wall:
i try something like :
BEGIN{
var=argv
}
{..}
END{..}
but obviously is not correct... (5 Replies)
All of my machines (various open source derivatives on x86 and amd64) store argv above the stack (at a higher memory address). I am curious to learn if any systems store argv below the stack (at a lower memory address).
I am particularly interested in proprietary Unices, such as Solaris, HP-UX,... (9 Replies)
Using the awk below I am able to combine all the matching dates in $1, but I can not seem to remove the non-matching from the file. Thank you :).
file
20161109104500.0+0000,x,5631
20161109104500.0+0000,y,2
20161109104500.0+0000,z,2
20161109104500.0+0000,a,4117... (3 Replies)