Sponsored Content
Top Forums Shell Programming and Scripting Storing output of "time" command to a variable Post 302489671 by happening_linux on Friday 21st of January 2011 07:56:14 AM
Old 01-21-2011
Hi Tuxidow.

Thanks for the response.
I had tried the format that u posted but didn't work in case of time command. Command, the result of which I would like to save in a variable is : "time ls -R /opt"

Hope this may clear my question more.
 

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. Debian

Debian: doubt in "top" %CPU and "sar" output

Hi All, I am running my application on a dual cpu debian linux 3.0 (2.4.19 kernel). For my application: <sar -U ALL> CPU %user %nice %system %idle ... 10:58:04 0 153.10 0.00 38.76 0.00 10:58:04 1 3.88 0.00 4.26 ... (0 Replies)
Discussion started by: jaduks
0 Replies

3. Shell Programming and Scripting

How to remove "New line characters" and "spaces" at a time

Dear friends, following is the output of a script from which I want to remove spaces and new-line characters. Example:- Line1 abcdefghijklmnopqrstuvwxyz Line2 mnopqrstuvwxyzabcdefghijkl Line3 opqrstuvwxyzabcdefdefg Here in above example, at every starting line there is a “tab” &... (4 Replies)
Discussion started by: anushree.a
4 Replies

4. Shell Programming and Scripting

How to store the output of "time dd if= of=" in a variable

Hi All, I need to store the real seconds of the following command in a variable. How could it be done? time $(dd if=/dev/zero of=/dev/sda1 bs=512 count=2048;sync) Thanks, Amio (12 Replies)
Discussion started by: amio
12 Replies

5. 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

6. 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

7. UNIX for Dummies Questions & Answers

Explanation of "total" field in "ls -l" command output

When I do a listing in one particular directory (ls -al) I get: total 43456 drwxrwxrwx 2 root root 4096 drwxrwxrwx 3 root root 4096 -rwxrwxr-x 1 nobody nobody 3701594 -rwxrwxr-x 1 nobody nobody 3108510 -rwxrwxr-x 1 nobody nobody 3070580 -rwxrwxr-x 1 nobody nobody 3099733 -rwxrwxr-x 1... (1 Reply)
Discussion started by: proactiveaditya
1 Replies

8. 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

9. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

10. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
openipmicmd(1)						     An IPMI Command Interface						    openipmicmd(1)

NAME
openipmicmd - An IPMI Command Interface SYNOPSIS
openipmicmd [-k entry-to-execute] <connection parms> DESCRIPTION
The openipmicmd program allows a user to execute direct IPMI commands. It can work with direct interface with the OpenIPMI driver or with IPMI LAN interfaces. OPTIONS
-k entry-to-execute Execute a single command an exit. <connectionparms> The parameters for the connection depend on the connection type. These are all described in openipmi_conparms (7) COMMANDS
Once up, you can execute commands in the user interface. Note that commands and responses are asynchronous, you issue a command and the interface returns immediately. When the response comes back, it will be dumped on your console. That's a little strange looking, but IPMI is ansychronous underneath. Note that the -k option is synchronous, it will wait for the response or a timeout before returning. 0f lun netfn cmd [data1 [data2 ...]] Send a command to the BMC you are connected to. channel [ipmb] IPMB-addr lun netfn [seq] cmd [data1 [data2 ...]] Send a command to a device on the IPMB bus. The "ipmb" string is optional. The seq must be provided if the netfn is a response (an odd number). It must be the same sequence number that came in on the command in the "Command Sequence = seq" part of the command. channel 00 IPMB-addr lun netfn cmd [data1 [data2 ...]] Send a broadcast command to a device on the IPMB bus. channel lan handle remote-swid local-swid lun netfn cmd [data1 [data ...]] Send a command to a device over a LAN channel. Note that this not the same as a LAN connection. This sends a message through a local BMC to a remote system that is hooked up with a LAN connection. test_lat count command Executes the given commands (one of the previous commands) count times and gives the average time per command to execute. Note that "count" is hexadecimal. help Display some help. regcmd netfn cmd Register to receive the given command. If the driver receives an external command, it will print it out. This only works with sys- tem interface connections, it will not work on LAN connections. unregcmd netfn cmd Remove a command registration. SEE ALSO
ipmi_ui(1), ipmilan(8), openipmi_conparms(7) KNOWN PROBLEMS
The asychronous nature of the program can be annoying. AUTHOR
Corey Minyard <cminyard@mvista.org> OpenIPMI 05/13/03 openipmicmd(1)
All times are GMT -4. The time now is 01:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy