Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to outfile contant as an input for a command Post 302375195 by nitin_aaa27 on Friday 27th of November 2009 01:34:30 AM
Old 11-27-2009
How to outfile contant as an input for a command

I`m having output file which contain following no which changes every time i run script.The number given below are there in file and i have to fatch them from file.
12
15
56
158
365
165
598
568
265
256
258
now i want to use above number from output to input as $j
r=`/omp/bin/ICIC "pp:call $j,cdd 2,ccc 1"|grep -w "BU"|wc -l`
$j should have above no as an input .please help.above number are there in a output file and now i want to use them in above command as n input.

Last edited by nitin_aaa27; 11-27-2009 at 08:46 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Setting outfile with (brackets)

I have a file that comes in as 20081002_invoices.txt and needs to go out as invoices(20081002).xls When ran this file should have three seperate fields as follows: column1 column2 column3 data1 data2 data3 when i run the script it produces the invoices(20081002).xls but moves... (1 Reply)
Discussion started by: Pablo_beezo
1 Replies

2. UNIX for Dummies Questions & Answers

problem with output of find command being input to basename command...

Hi, I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script. I am planning to do like this: if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies

3. UNIX for Dummies Questions & Answers

ps command input

Hi, When we issue a ps command we get some output. From where does this ps command take the input from? Thanks in advance. (1 Reply)
Discussion started by: icefish
1 Replies

4. Shell Programming and Scripting

How to extract some parts of a file to create some outfile

Hi All, I am very new in programming. I need some help. I have one input file like: Number of disabled taxa: 9 Loading mapping file: ncbi.map Load mapping: taxId2TaxLevel: 469951 --- Subsample reads (20%): 66680 of 334386 Processing: tree-from-summary Running tree-from-summary... (21 Replies)
Discussion started by: iammitra
21 Replies

5. Shell Programming and Scripting

print to more than one outfile AWK

I'd like to do an if / else if condition and print to different files. Something like: awk '{ if ($1 == "yes") print $2, $4 < infile > outfile1 ; else if ($1 == "No") print $2, $4 < infile > outfile2 }' Obviously I don't know the syntax. Thanks so much. (5 Replies)
Discussion started by: dcfargo
5 Replies

6. Shell Programming and Scripting

Difference of two data files & writing to an outfile.

Hi Everyone, I have two files i.e. one file2 contains today's data and the other file1 contains Yesterday's data. The data in the files contains 226 columns and the data for the coulums separated by a Pipe "|" delimiter. Now, I have 4 Primary keys (coulumns) by which I have to compare file2 and... (10 Replies)
Discussion started by: filter
10 Replies

7. Shell Programming and Scripting

Copying the Header & footer Information to the Outfile.

Hi I am writing a perl script which checks for the specific column values from a file and writes to the OUT file. So the feed file has a header information and footer information. I header information isaround107 lines i.e. Starts with START-OF-FILE ....... so on .... ... (11 Replies)
Discussion started by: filter
11 Replies

8. UNIX for Dummies Questions & Answers

Outfile

Hi guys! So I have a program that allows the user to enter a file, change some characters (for example, a changes to t, etc.) and then save the new file under a new name. However, I need to press carriage return twice for the program to end. I was just wondering if anyone knew of a way for the... (2 Replies)
Discussion started by: PerlNutt
2 Replies

9. UNIX for Dummies Questions & Answers

xls2csv.py won't print to outfile

Hi, I'm trying to use pyExcelerator's module "xls2csv" converter in ubuntu. The following works great, except the standard out is in the terminal. sudo python xls2csv.py test.xls I want the csv delimited output to be redirected to a file. When I enter.... sudo python xls2csv.py test.xls... (5 Replies)
Discussion started by: jdilts
5 Replies

10. UNIX for Beginners Questions & Answers

INTO OUTFILE Error 2

Good day, I am trying to run the following command but it does not seem to work. # mysql -pPassword asteriskcdrdb -s -b -e "select 'Account ID','Destination','Operator','Provider','Date','BillSec','Rate id','Cost' UNION select accountcode,dst,'PBX',route_name,date_format(calldate,'%Y/%c/%e... (8 Replies)
Discussion started by: esgaroth32
8 Replies
SNMPDELTA(1)							     Net-SNMP							      SNMPDELTA(1)

NAME
snmpdelta - Monitor delta differences in SNMP Counter values SYNOPSIS
snmpdelta [ common options ] [-Cf] [ -Ct ] [ -Cs ] [ -CS ] [ -Cm ] [ -CF configfile ] [ -Cl ] [ -Cp period ] [ -CP Peaks ] [ -Ck ] [ -CT ] AGENT OID [ OID ... ] DESCRIPTION
snmpdelta will monitor the specified integer valued OIDs, and report changes over time. AGENT identifies a target SNMP agent, which is instrumented to monitor the given objects. At its simplest, the AGENT specification will consist of a hostname or an IPv4 address. In this situation, the command will attempt communication with the agent, using UDP/IPv4 to port 161 of the given target host. See snmpcmd(1) for a full list of the possible formats for AGENT. OID is an object identifier which uniquely identifies the object type within a MIB. Multiple OIDs can be specified on a single snmpdelta command. OPTIONS
COMMON OPTIONS Please see snmpcmd(1) for a list of possible values for COMMON OPTIONS as well as their descriptions. -Cf Don't fix errors and retry the request. Without this option, if multiple oids have been specified for a single request and if the request for one or more of the oids fails, snmpdelta will retry the request so that data for oids apart from the ones that failed will still be returned. Specifying -Cf tells snmpdelta not to retry a request, even if there are multiple oids specified. -Ct Flag will determine time interval from the monitored entity. -Cs Flag will display a timestamp. -CS Generates a "sum count" in addition to the individual instance counts. The "sum count" is the total of all the individual deltas for each time period. -Cm Prints the max value ever attained. -CF configfile Tells snmpdelta to read it's configuration from the specified file. This options allows the input to be set up in advance rather than having to be specified on the command line. -Cl Tells snmpdelta to write it's configuration to files whose names correspond to the MIB instances monitored. For example, snmpdelta -Cl localhost ifInOctets.1 will create a file "localhost-ifInOctets.1". -Cp Specifies the number of seconds between polling periods. Polling constitutes sending a request to the agent. The default polling period is one second. -CP peaks Specifies the reporting period in number of polling periods. If this option is specified, snmpdelta polls the agent peaks number of times before reporting the results. The result reported includes the average value over the reporting period. In addition, the highest polled value within the reporting period is shown. -Ck When the polling period (-Cp) is an increment of 60 seconds and the timestamp is displayed in the output (-Cs), then the default display shows the timestamp in the format hh:mm mm/dd. This option causes the timestamp format to be hh:mm:ss mm/dd. -CT Makes snmpdelta print its output in tabular form. -Cv vars/pkt Specifies the maximum number of oids allowed to be packaged in a single PDU. Multiple PDUs can be created in a single request. The default value of variables per packet is 60. This option is useful if a request response results in an error becaues the packet is too big. EXAMPLES
$ snmpdelta -c public -v 1 -Cs localhost IF-MIB::ifInUcastPkts.3 IF-MIB::ifOutUcastPkts.3 [20:15:43 6/14] ifInUcastPkts.3 /1 sec: 158 [20:15:43 6/14] ifOutUcastPkts.3 /1 sec: 158 [20:15:44 6/14] ifInUcastPkts.3 /1 sec: 184 [20:15:44 6/14] ifOutUcastPkts.3 /1 sec: 184 [20:15:45 6/14] ifInUcastPkts.3 /1 sec: 184 [20:15:45 6/14] ifOutUcastPkts.3 /1 sec: 184 [20:15:46 6/14] ifInUcastPkts.3 /1 sec: 158 [20:15:46 6/14] ifOutUcastPkts.3 /1 sec: 158 [20:15:47 6/14] ifInUcastPkts.3 /1 sec: 184 [20:15:47 6/14] ifOutUcastPkts.3 /1 sec: 184 [20:15:48 6/14] ifInUcastPkts.3 /1 sec: 184 [20:15:48 6/14] ifOutUcastPkts.3 /1 sec: 184 [20:15:49 6/14] ifInUcastPkts.3 /1 sec: 158 [20:15:49 6/14] ifOutUcastPkts.3 /1 sec: 158 ^C $ snmpdelta -c public -v 1 -Cs -CT localhost IF-MIB:ifInUcastPkts.3 IF-MIB:ifOutcastPkts.3 localhost ifInUcastPkts.3 ifOutUcastPkts.3 [20:15:59 6/14] 184.00 184.00 [20:16:00 6/14] 158.00 158.00 [20:16:01 6/14] 184.00 184.00 [20:16:02 6/14] 184.00 184.00 [20:16:03 6/14] 158.00 158.00 [20:16:04 6/14] 184.00 184.00 [20:16:05 6/14] 184.00 184.00 [20:16:06 6/14] 158.00 158.00 ^C The following example uses a number of options. Since the Cl option is specified, the output is sent to a file and not to the screen. $ snmpdelta -c public -v 1 -Ct -Cs -CS -Cm -Cl -Cp 60 -CP 60 interlink.sw.net.cmu.edu .1.3.6.1.2.1.2.2.1.16.3 .1.3.6.1.2.1.2.2.1.16.4 fi SEE ALSO
snmpcmd(1), variables(5). 4th Berkeley Distribution 25 Jul 2003 SNMPDELTA(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