Making some assumptions on your data structure (until Don Cragun's questions have been fully and finally answered), and making up my own sample data files, I have come up with
Give it a try and report back.
Hi
I need to pass an array to Awk script from Shell. Can you please tell how to do it? How to pass this array add_ct_arr to an awk script or access it in awk?
i=1
while ;
do
add_ct_arr=$(echo ${adda_count} | awk -v i=$i -F" " '{print $i;}')
echo ${add_ct_arr}
... (1 Reply)
Hi All :),
I am very new to unix. I am requiring ur help in developing shell script for below problem.
I have to replace the second field of file with values of array sequentially where first field is ValidateKeepVar
<File>
UT-ExtractField 1 | &LogEntry &Keep(DatatoValidate)... (3 Replies)
OS=HP-UX ksh
The following works, except I want to include the <start> and <end> in the output.
awk -F '<start>' 'BEGIN{RS="<end>"; OFS="\n"; ORS=""} {print $2} somefile.log'
The following work in bash but not in ksh
sed -n '/^<start>/,/^<end>/{/LABEL$/!p}' somefile.log (4 Replies)
Hi, all
suppose I have following myfile (delimited by tab)
aa bb
cc dd
ee ffand I have following awk command:
awk 'BEGIN{FS="\t"}{AwkArrayVar_1=$1;AwkArrayVar_2=$2};END{for(i=0; i<NR; i++) print i, AwkArrayVar_1, AwkArrayVar_2,}' myfileMy question is: how can I assign the awk array... (7 Replies)
hi,
i want to pass an array parameters to a sftp script so that i can transfer each file in the array to the remote server by connecting only once to the sftp remote server.
i thought of using a variable that contains list of file names separated by a space and pass the variable to the sftp... (3 Replies)
There are two parts to this. In the first part I need to read a list of files from a directory and split it into 4 arrays. I have done that with the following code,
# collect list of file names
STATS_INPUT_FILENAMES=($(ls './'$SET'/'$FOLD'/'*'in.txt'))
# get number of files... (8 Replies)
I need to create a shell script to delete multiple items (Strings) at a time from a file.
I need to iterate through a list of strings.
My plan is to create an array and then iterate through the array.
My code is not working
#!/bin/bash -x
declare -a array=(one, two, three, four)... (5 Replies)
Hello,
I have some tab delimited text data,
file: final_temp1
aname val
NAME;r'(1,) 3.28584
r'(2,)<tab>
NAME;r'(3,) 6.13003
NAME;r'(4,) 4.18037
r'(5,)<tab>
You can see that the data is incomplete in some cases. There is a trailing tab after the first column for each incomplete row. I... (2 Replies)
Hello,
I have a src code file where I need to uncomment many lines.
The lines I need to uncomment look like,
C CALL l_r(DESNAME,DESOUT, 'Gmax', ESH(10), NO_APP, JJ)
The comment is the "C" in the first column. This needs to be deleted so that there are 6 spaces preceding "CALL".... (7 Replies)
Discussion started by: LMHmedchem
7 Replies
LEARN ABOUT FREEBSD
nfsstat
NFSSTAT(1) BSD General Commands Manual NFSSTAT(1)NAME
nfsstat -- display NFS statistics
SYNOPSIS
nfsstat [-cemoszW] [-M core] [-N system] [-w wait]
DESCRIPTION
The nfsstat command displays statistics kept about NFS client and server activity. For the NFSv4 server, the statistics are for operations
within the Compound RPCs and not the count of RPCs. If you wish to compare RPC counts between NFSv3 and NFSv4, you must use statistics in
the client(s).
The options are as follows:
-c Only display client side statistics.
-e Report the extra statistics collected by the new NFS client and server for NFSv4. This option is incompatible with -o.
-M Extract values associated with the name list from the specified core instead of the default /dev/kmem.
-m Report the mount options for all new NFS client mounts. This option overrides all others and nfsstat will exit after completing the
report. This option is only supported by the new NFS client.
-N Extract the name list from the specified system instead of the default /boot/kernel/kernel.
-o Report statistics for the old NFS client and/or server. Without this option statistics for the new NFS client and/or server will be
reported.
-s Only display server side statistics.
-W Use wide format with interval short summary. This option is especially useful when combined with -c or -s and a time delay.
-w Display a shorter summary of NFS activity for both the client and server at wait second intervals.
-z Reset statistics after displaying them.
FILES
/boot/kernel/kernel default kernel namelist
/dev/kmem default memory file
SEE ALSO fstat(1), netstat(1), ps(1), systat(1), sysctl(3), iostat(8), nfsdumpstate(8), pstat(8), vmstat(8)HISTORY
The nfsstat command appeared in 4.4BSD.
BSD May 1, 2013 BSD