You can also simplify the if statement in the next section:
can become
because you already processed a 'd' record above and skipped the rest of the processing. It's minor, but makes it more efficient and that could help if your input is huge.
I have a while loop which looks for files and then sets a variable to give me the record count of each file:
current_members=`wc -l ${DATA_DIR}/$MEMBERS_FILENAME | nawk '{ printf "%d\n", $0}'`
I am out putting the totals into a file:
echo $current_members >> ../data/out_total_members.dat
... (7 Replies)
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
When I run the following command in the shell it works fine. It prints a city name and then a path for a file.
~$ for i in `awk -F':' '{print $0}' /home/knoppix/Desktop/data/subs | grep -m 1 $ city | sed "s/:/ /"`
>do
>echo $i
>done
Now, when I place it in this shell script (sh) it prints... (6 Replies)
I need to get total number of hdisk not assigned to any VGs.
PDC # lspv |grep None |awk '{print $1}' |wc
131 131 1099
So, it shows 131 hdisks.
I need to look at the individual hdisk fget_config info like below:
PDC # fget_config -Av |grep hdisk230
hdisk230 dac1 229... (4 Replies)
Hi all,
after hours of playing around with this and scouring the web I decided to ask my fellow UNIX operators as I can't wrap my head around this.
First off,
I want to parse an input file with tabs (I could pull this off easily with different delimiters) but I was trying to make nicer... (2 Replies)
Have built this script, the output is what I needed, but NR 6 is omitted. Why? Is it an error? I am using Gawk.
'{nr=$2;f = $1} END{for (i=1;i<=f;i++) if (nr != i) print i, nr }' input1.csv >output1.csvinput1.csv
1 9
3 5
4 1
7 6
8 5
10 6
output1.csv > with the missing line number 6. 6 is... (5 Replies)
Hi Expert,
I have a .sh script in my home/new_dir/script.sh
This script creates number of output files at home/new_dir/email, home/new_dir/logs dir.
I am running this script using crontab (owner root).
Now this output files are getting created with
rw-r----- 1 root root
So if i... (2 Replies)
while IFS= read -r line
do
# sV for version detection
nmap -T4 -Pn -v -sS "$line" > "text/$line"
done < <(grep '' $file)
Hi,
where line represents the IP.
I am using NMAP to do scanning.
How can I set to execute that command in the loop several concurrently at a time instead of one... (5 Replies)
Discussion started by: alvinoo
5 Replies
LEARN ABOUT SUSE
netsnmp_utilities
utility_handlers(3) net-snmp utility_handlers(3)NAME
utility_handlers -
Simplify request processing A group of handlers intended to simplify certain aspects of processing a request for a MIB object.
Modules
bulk_to_next
Convert GETBULK requests into GETNEXT requests for the handler.
cache_handler
Maintains a cache of data for use by lower level handlers.
debug
Print out debugging information about the handler chain being called.
mode_end_call
At the end of a series of requests, call another handler hook.
multiplexer
Splits mode requests into calls to different handlers.
read_only
Make your handler read_only automatically The only purpose of this handler is to return an appropriate error for any requests passed to it
in a SET mode.
row_merge
Calls sub handlers with request for one row at a time.
serialize
Calls sub handlers one request at a time.
stash_to_next
Convert GET_STASH requests into GETNEXT requests for the handler.
Detailed Description
Simplify request processing A group of handlers intended to simplify certain aspects of processing a request for a MIB object.
These helpers do not implement any MIB objects themselves. Rather they handle specific generic situations, either returning an error, or
passing a (possibly simpler) request down to lower level handlers.
Author
Generated automatically by Doxygen for net-snmp from the source code.
Version 5.5 23 Sep 2009 utility_handlers(3)