Sponsored Content
Top Forums Shell Programming and Scripting How to store the output of "time dd if= of=" in a variable Post 302294044 by amio on Wednesday 4th of March 2009 10:41:03 AM
Old 03-04-2009
Hi Franklin,
Sorry, it ended with "Bad File Descriptor"..
Thanks
Amio
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Please help formatting bash "time" variable to HH:MM:SS format

Ok, this is going to be hard to describe, but here it goes. I have written a bash script that, while executing starts a timer, and when done stops the timer. The $RUNTIME variable value is in seconds, so the variable usually equals a number like 126 (equals 2 minutes 6 seconds). In my script I... (3 Replies)
Discussion started by: vikingshelmut
3 Replies

2. Shell Programming and Scripting

passing the output of cmd from "eval" to a variable

Hello, I need help with the eval command. I have been building a lengthy cmd using eval, and I need to create $var from the output of the cmd. Here is what I have. Out=/dfezz1/output.txt Node="'LPAR Info:'" Gr3p0=" |grep" Printc=" prtconf" Output1=" 1>>$Out 0>&1" Cat1="cat... (8 Replies)
Discussion started by: dfezz1
8 Replies

3. Shell Programming and Scripting

store the output of "find" command in a variable?

I intend to find the path/full location of a file(filename given by user thru "read filenme") using "find" or any other command and then store it's output in a variable for some other processing. But struggling to put all things together (i.e finding the fully qualified location of that file and... (4 Replies)
Discussion started by: punitpa
4 Replies

4. Shell Programming and Scripting

ksh script that echo " please insert your name " and store the output to a login.log file.

Hello All Nice to meet you all here in this forum, it's my 1rst time here i'm asking about a little issue that i face i added a ksh script that echo " please insert your name " and store the output to a login.log file. the script is working fine with normal telnet but Xstart is not working... (8 Replies)
Discussion started by: islam.said
8 Replies

5. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

6. Shell Programming and Scripting

Unable to store "-e" in variable ??????

p="-e" echo $p It is not returning the value "-e" stored. Instead returns null. I am wondering how could this happen. Please help me out.I tried all possibilities like p='-e' | p="\-e". Nothing seems to work. :confused::confused: (10 Replies)
Discussion started by: shanneykar
10 Replies

7. Shell Programming and Scripting

Store Host lookup in variable ("on the fly")

Hi, I'm new here. I was wondering why I can't store a host lookup in a variable. for line in $(< blacklist) do STOREIP=host $line; if ]; then $line >> blacklist2; else $line >> blacklist3; fi done Result: "ip" command not found .. so how would I store the host lookup in the... (2 Replies)
Discussion started by: sOliver
2 Replies

8. Shell Programming and Scripting

Storing output of "time" command to a variable

Hi all, I am new to Linux/shell scripting having moderate knowledge. In my script, I need to get execution time of a command (say 'ls') in mili seconds level. For this i tried using "time" command to retrieve the total execution time in milli seconds. But, the problem is that, how to save... (9 Replies)
Discussion started by: happening_linux
9 Replies

9. Shell Programming and Scripting

Get "n" number of lines from the specified file and store the output to the new file

Hiii. How are you all. .. I have started to learn bash scripting.. . and I am pretty much trying to execute this script which I am still not successful.. . This is what I am trying to do. .. need to get "n" number of lines from the specified file and store the output to the new file in... (5 Replies)
Discussion started by: zsycho
5 Replies

10. Shell Programming and Scripting

Unable to store "python --version" to a shell variable

Hi All, I need to get the version of python installed and store it in a variable for later use. Whereas it is printing on the console instead of storing to variable. I am able to store output of ls command in a variable. Please check the below code : root@myhost:/volumes/srini# cat... (4 Replies)
Discussion started by: srinivasan.neel
4 Replies
MRTG-MIBHELP(1) 						       mrtg							   MRTG-MIBHELP(1)

NAME
mrtg-mibhelp - A Table of some interesting OIDs OVERVIEW
This File Contains a collection of interesting MIB Entries ... mrtg knows about their names ... depending on the ASN.1 Syntax you may have to put gauge into the Options[]: parameter. For information about how to create a Target[]: parameter which references these MIB entries, please consult mrtg-reference. MIB LIST
ifOperStatus Descriptor: ifOperStatus Identifier: 1.3.6.1.2.1.2.2.1.8 ASN.1 Syntax: INTEGER Enumeration: up 1, down 2, testing 3 The current operational state of the interface. The testing(3) state indicates that no operational packets can be passed. ifAdminStatus Descriptor: ifAdminStatus Identifier: 1.3.6.1.2.1.2.2.1.7 ASN.1 Syntax: INTEGER Enumeration: up 1, down 2, testing 3 The current administrative state of the interface. The testing(3) state indicates that no operational packets can be passed. ifInOctets Descriptor: ifInOctets Identifier: 1.3.6.1.2.1.2.2.1.10 ASN.1 Syntax: Counter32 The total number of octets received on the interface, including framing characters. ifInUcastPkts Descriptor: ifInUcastPkts Identifier: 1.3.6.1.2.1.2.2.1.11 ASN.1 Syntax: Counter32 The number of subnetwork-unicast packets delivered to a higher-layer protocol. ifInNUcastPkts Descriptor: ifInNUcastPkts Identifier: 1.3.6.1.2.1.2.2.1.12 ASN.1 Syntax: Counter32 The number of non-unicast (i.e., subnetwork- broadcast or subnetwork-multicast) packets delivered to a higher-layer protocol. ifInDiscards Descriptor: ifInDiscards Identifier: 1.3.6.1.2.1.2.2.1.13 ASN.1 Syntax: Counter32 The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. ifInErrors Descriptor: ifInErrors Identifier: 1.3.6.1.2.1.2.2.1.14 ASN.1 Syntax: Counter32 The number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. ifInUnknownProtos Descriptor: ifInUnknownProtos Identifier: 1.3.6.1.2.1.2.2.1.15 ASN.1 Syntax: Counter32 The number of packets received via the interface which were discarded because of an unknown or unsupported protocol. ifOutOctets Descriptor: ifOutOctets Identifier: 1.3.6.1.2.1.2.2.1.16 ASN.1 Syntax: Counter32 The total number of octets transmitted out of the interface, including framing characters. ifOutUcastPkts Descriptor: ifOutUcastPkts Identifier: 1.3.6.1.2.1.2.2.1.17 ASN.1 Syntax: Counter32 The total number of packets that higher-level protocols requested be transmitted to a subnetwork-unicast address, including those that were discarded or not sent. ifOutNUcastPkts Descriptor: ifOutNUcastPkts Identifier: 1.3.6.1.2.1.2.2.1.18 ASN.1 Syntax: Counter32 The total number of packets that higher-level protocols requested be transmitted to a non- unicast (i.e., a subnetwork-broadcast or subnetwork-multicast) address, including those that were discarded or not sent. ifOutDiscards Descriptor: ifOutDiscards Identifier: 1.3.6.1.2.1.2.2.1.19 ASN.1 Syntax: Counter32 The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space. ifOutErrors Descriptor: ifOutErrors Identifier: 1.3.6.1.2.1.2.2.1.20 ASN.1 Syntax: Counter32 The number of outbound packets that could not be transmitted because of errors. ifOutQLen Descriptor: ifOutQLen Identifier: 1.3.6.1.2.1.2.2.1.21 ASN.1 Syntax: Unsigned32 The length of the output packet queue (in packets). frInOctets From: Simon Ferrett <simonf@world.net> 'frInOctets' => '1.3.6.1.2.1.10.32.2.1.9' 'frOutOctets' => '1.3.6.1.2.1.10.32.2.1.7' which when used in the form: frInOctets.pp.dd&frOutOctets.pp.dd:community@cisco.router where pp is the physical port that the frame relay pvc is defined on and dd is the DLCI of the pvc gets you the in and out octets for just that pvc. ifAdminHack and ifOperHack The return values of ifAdminStatus and ifOperStatus are not very useful for graphing. Use ifOperHack and ifAdminHack instead. They return 1 for UP and 0 otherwise. Note these are not real MIB entities but mrtg hacks PseudoZero and PseudoOne will return 0 and 1 respectively Note these are not real MIB entities but mrtg hacks AUTHOR
Tobias Oetiker <tobi@oetiker.ch> 2.17.4 2012-01-12 MRTG-MIBHELP(1)
All times are GMT -4. The time now is 01:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy