Sponsored Content
Full Discussion: Shell Script average runtime
Homework and Emergencies Homework & Coursework Questions Shell Script average runtime Post 302563971 by navlelo on Wednesday 12th of October 2011 02:03:33 PM
Old 10-12-2011
shit got messy without the | bc ... x)

Code:
~/oblig1$ bash oblig2.sh
(
( ( /home/oblig1/oblig1a * 60) * sh ) +
( ( --2011-10-12 20 * 60) * 03 ) +
( ( Løser osyda50 * 60) * hive ) +
( ( Ansluter till osyda50 * 60) * hive ) +
( ( HTTP foresprrsel sendt, mottar topptekster * 60) *  ) +
( ( Återanvänder befintlig anslutning till osyda50 * 60) * hive ) +
( ( HTTP foresprrsel sendt, mottar topptekster * 60) *  ) +
( ( Lengde * 60) *  20732 (20K) [text/html] ) +
( ( Sparar till "01 * 60) * html" ) +
( (  * 60) *  ) +
( (      0K  * 60) *  ) +
( (  * 60) *  ) +
( ( 2011-10-12 20 * 60) * 03 ) +
( (  * 60) *  ) +
( ( --2011-10-12 20 * 60) * 03 ) +
( ( Løser osyda50 * 60) * hive ) +
( ( Ansluter till osyda50 * 60) * hive ) +
( ( HTTP foresprrsel sendt, mottar topptekster * 60) *  ) +
( ( Återanvänder befintlig anslutning till osyda50 * 60) * hive ) +
( ( HTTP foresprrsel sendt, mottar topptekster * 60) *  ) +
( ( Lengde * 60) *  36367 (36K) [text/html] ) +
( ( Sparar till "02 * 60) * html" ) +
( (  * 60) *  ) +
( (      0K  * 60) *  ) +
( (  * 60) *  ) +
( ( 2011-10-12 20 * 60) * 03 ) +
( (  * 60) *  ) +
( ( --2011-10-12 20 * 60) * 03 ) +
( ( Løser osyda50 * 60) * hive ) +
( ( Ansluter till osyda50 * 60) * hive ) +
( ( HTTP foresprrsel sendt, mottar topptekster * 60) *  ) +
( ( Återanvänder befintlig anslutning till osyda50 * 60) * hive ) +
( ( HTTP foresprrsel sendt, mottar topptekster * 60) *  ) +
( ( Lengde * 60) *  14439 (14K) [text/html] ) +
( ( Sparar till "03 * 60) * html" ) +
( (  * 60) *  ) +

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

korn shell version at runtime?

How can I check what kornshell version I am using at runtime from within a kornshell script? (3 Replies)
Discussion started by: qanda
3 Replies

2. Shell Programming and Scripting

pass runtime parm to at -f shell script

Hi Folks... I am using a ksh script to submit the at command to run a shell script for immediate execution. The shell script requries 1 parameter. Command in the script is at -m -f $EXE_DIR/process_server.sh $START_TIME $DB_NAME where START_TIME=now and DB_NAME= tnsname of Oracle... (1 Reply)
Discussion started by: island360
1 Replies

3. AIX

allocate memory for shell script at runtime during execution--urgent critical help!!

How to allocate memory for a shell script on aix box at the time of execution i.e at runtime Are there any commands for AIX in specific Thanks in Advance (1 Reply)
Discussion started by: aixjadoo
1 Replies

4. UNIX for Dummies Questions & Answers

allocate memory for a shell script at runtime--urgent critical help!!!

How to allocate memory for a shell script on aix box at the time of execution i.e at runtime Are there any commands for AIX in specific Thanks in Advance (3 Replies)
Discussion started by: aixjadoo
3 Replies

5. UNIX for Advanced & Expert Users

Allocate memory for a shell script in Aix at runtime-urgent critical

How to allocate memory for a shell script on aix box at the time of execution i.e at runtime Are there any commands for AIX in specific Thanks in Advance (1 Reply)
Discussion started by: aixjadoo
1 Replies

6. Shell Programming and Scripting

passing runtime arguments to a shell script...

hi I am new to shell programming.....my question is while running one of my shell program it stops in between to accept input from the user and proceeds furthur after giving input....I want to know whether I can set this input through some files so that the shell acript reads the input from the... (10 Replies)
Discussion started by: santy
10 Replies

7. Shell Programming and Scripting

Shell Runtime Statistics

Hi, I am trying to capture runtime stats of a shell script (c shell). Are there system variables to call? Or should I create a date variable at the start of the script and at the end of the script? I am trying to capture the time if the script stops or ends with error. Please help. ... (4 Replies)
Discussion started by: CKT_newbie88
4 Replies

8. Shell Programming and Scripting

shell script for finding average runtime of other script

so I've made a shell script that downloads 6 files in succession from a given url, then deletes them. Now I want to time the script, and the average time it uses by running it ~100 times. My problem is tho, how do I store the time it takes for each run through of the script? I know time writes to... (3 Replies)
Discussion started by: navlelo
3 Replies

9. Shell Programming and Scripting

Shell or awk script to compute average of all the points within a circle

HI Help, I have a file which looks like below --- Input file ---> 1970113.00000 3460.00000 1.09516 1970116.00000 3791.00000 1.06350 1970120.00000 4120.00000 1.07588 1970115.00000 4450.00000 1.09591 1970116.00000 4780.00000 1.09965 1970120.00000 5109.00000 1.06733 ... (7 Replies)
Discussion started by: Indra2011
7 Replies

10. Shell Programming and Scripting

Shell script to create runtime variables based on the number of parameters passed in the script

Hi All, I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them abc.sh ---------- export Numbr_Parms=$# export a=1 while do export... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
hivexregedit(1) 						 Windows Registry						   hivexregedit(1)

NAME
hivexregedit - Merge and export Registry changes from regedit-format files. SYNOPSIS
hivexregedit --merge [--prefix prefix] [--encoding enc] hivefile [regfile] hivexregedit --export [--prefix prefix] hivefile key > regfile DESCRIPTION
Please note hivexregedit is a low-level tool for manipulating hive files directly. To merge or export registry changes to Windows virtual machines it's better to use virt-win-reg(1). Given a local binary ("hive") file, there are two modes. "--merge" imports (merges) changes from a regedit-format file into the hive. It is similar to using the "/s" switch in Windows regedit.exe. "--export" exports a Registry key (recursively) into the regedit format. ENCODING "hivexregedit" expects that regedit files have already been re-encoded in the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-style line endings. Since Windows regedit files are often in UTF-16LE with Windows-style line endings, you may need to re-encode the whole file before or after processing. To re-encode a file from Windows format to Linux (before processing it with the "--merge" option), you would do something like this: iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg To go in the opposite direction, after using "--export" and before sending the file to a Windows user, do something like this: unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg For more information about encoding, see Win::Hivex::Regedit(3). If you are unsure about the current encoding, use the file(1) command. Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-style (CRLF) line endings, like this: $ file software.reg software.reg: Little-endian UTF-16 Unicode text, with very long lines, with CRLF line terminators This file would need conversion before you could "--merge" it. SHELL QUOTING Be careful when passing parameters containing "" (backslash) in the shell. Usually you will have to use 'single quotes' or double backslashes (but not both) to protect them from the shell. CurrentControlSet etc. Registry keys like "CurrentControlSet" don't really exist in the Windows Registry at the level of the hive file, and therefore you cannot modify these. "CurrentControlSet" is usually an alias for "ControlSet001". In some circumstances it might refer to another control set. The way to find out is to look at the "HKLMSYSTEMSelect" key: $ hivexregedit --export SYSTEM 'Select' [Select] "Current"=dword:00000001 "Default"=dword:00000001 "Failed"=dword:00000000 "LastKnownGood"=dword:00000002 "Current" is the one which Windows will choose when it boots. Similarly, other "Current..." keys in the path may need to be replaced. EXAMPLE
$ virt-cat WindowsGuest /Windows/System32/config/software > software.hive $ hivexregedit --export --prefix 'HKEY_LOCAL_MACHINESOFTWARE' software.hive 'Microsoft' > ms-keys.reg $ hivexregedit --merge system.hive --prefix 'HKEY_LOCAL_MACHINESYSTEM' additions.reg OPTIONS
--help Display help. --debug Enable debugging in the hivex library. This is useful for diagnosing bugs and also malformed hive files. --merge hivexregedit --merge [--prefix prefix] [--encoding enc] hivefile [regfile] Merge "regfile" (a regedit-format text file) into the hive "hivefile". If "regfile" is omitted, then the program reads from standard input. (Also you can give multiple input files). "--prefix" specifies the Windows Registry prefix. It is almost always necessary to use this when dealing with real hive files. "--encoding" specifies the encoding for unmarked strings in the input. It defaults to "UTF-16LE" which should work for recent versions of Windows. Another possibility is to use "ASCII". --export hivexregedit --export [--prefix prefix] hivefile key > regfile "key" is a path within the hive "hivefile". (The key should not contain any prefix and should be quoted to defend backslashes from the shell). The key is exported, recursively, to standard output in the textual regedit format. "--prefix" specifies the Windows Registry prefix. It is almost always necessary to use this when dealing with real hive files. --prefix prefix Hive files and Windows Registry key names are indirectly related. For example, inside the software hive, all keys are stored relative to "HKEY_LOCAL_MACHINESOFTWARE". Thus "HKEY_LOCAL_MACHINESOFTWAREMicrosoft" appears in the hive file as "Microsoft". The hive format itself does not store this prefix, so you have to supply it based on outside knowledge. (virt-win-reg(1), amongst other things, already knows about this). Usually it is sufficient to pass the parameter "--prefix 'HKEY_LOCAL_MACHINESOFTWARE'" or similar when doing merges and exports. --encoding UTF-16LE|ASCII When merging (only), you may need to specify the encoding for strings to be used in the hive file. This is explained in detail in "ENCODING STRINGS" in Win::Hivex::Regedit(3). The default is to use UTF-16LE, which should work with recent versions of Windows. --unsafe-printable-strings When exporting (only), assume strings are UTF-16LE and print them as strings instead of hex sequences. Remove the final zero codepoint from strings if present. This is unsafe and does not preserve the fidelity of strings in the original hive for various reasons: o Assumes the original encoding is UTF-16LE. ASCII strings and strings in other encodings will be corrupted by this transformation. o Assumes that everything which has type 1 or 2 is really a string and that everything else is not a string, but the type field in real hives is not reliable. o Loses information about whether a zero codepoint followed the string in the hive or not. This all happens because the hive itself contains no information about how strings are encoded (see "ENCODING STRINGS" in Win::Hivex::Regedit(3)). You should only use this option for quick hacking and debugging of the hive contents, and never use it if the output is going to be passed into another program or stored in another hive. SEE ALSO
virt-win-reg(1), Win::Hivex::Regedit(3), Win::Hivex(3), hivexsh(1), dos2unix(1), unix2dos(1), iconv(1), <http://libguestfs.org/>. AUTHOR
Richard W.M. Jones <http://people.redhat.com/~rjones/> COPYRIGHT
Copyright (C) 2010 Red Hat Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. hivex-1.3.6 2012-06-12 hivexregedit(1)
All times are GMT -4. The time now is 01:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy