Sponsored Content
Top Forums Shell Programming and Scripting Making a progress gauge in a bash script Post 302163255 by ccox85 on Thursday 31st of January 2008 11:28:31 AM
Old 01-31-2008
Making a progress gauge in a bash script

Hello once again:
One thing that seems to be a nice feature is a progress gauge... so I can see how long an operation will take for a task to complete if it is requiring a lot of processing or the file is enormous. I have seen references to gauge operations, but I don't know anything about it or how to use it, or anything like that. Can some give me an example of creating a gauge, text based, not graphical, or direct me to a decent tutorial? Thank you!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Making Application by bash

I'm using Mac OSX. And i want to make an visual application based on bash command. But, apple script doesn't support Terminal command. So please tell me how to turn my dream into a reality. :o I mean purely by bash! (0 Replies)
Discussion started by: Euler04
0 Replies

2. Shell Programming and Scripting

Perl module script to draw speedometer/gauge graphs

Hi, Has anyone used any perl modules to draw dashboard/gauge graphs similar to a speedometer? I am looking to create some graphs in perl. Please share your thoughts if there are any modules and an example script. Thanks (0 Replies)
Discussion started by: devtakh
0 Replies

3. Shell Programming and Scripting

bash: making a count

ok basically im trying to count how many people fail a class by comparing there grade by -gt 49 i tried putting a count inside the while loop but i know you cant access a count outside a subshell. is there an easy way to count the number of failures? declare -i failcount=0 awk... (2 Replies)
Discussion started by: nilekyle
2 Replies

4. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

5. Shell Programming and Scripting

Making a bash script and small C program for a homework assignment

Here's the assignment. I'll bold the parts that are rough for me. Unfortunately, that's quite a bit lol. The syntax is, of course, where my issues lie, for the most part. I don't have a lot of programming experience at all :/. I'd post what I've already done, but I'm so lost I really don't know... (1 Reply)
Discussion started by: twk101
1 Replies

6. Shell Programming and Scripting

Help in making a basic bash script

Hi All, I am trying to monitor CPU load of few processes, with the same name. The output that I get from top is the following 28171 root 20 0 1089m 21m 3608 S 103 0.3 15:16.89 /opt/ppp//h264rtptranscoder.bin --videoPort=14504 --audioPort=14505 27589 root 20 0 1060m 23m... (3 Replies)
Discussion started by: liviusbr
3 Replies

7. Shell Programming and Scripting

Bash script for making complexes of ligands and receptor

I am working with autodock vina for virtual screening and docking with cygwin. Autodock vina generates conformers for multiple ligands. I want to make the complex of these conformers with receptor. e.g. I have 100 .pdbqt files form vina output and one receptor pdbqt file. By running command- cut... (1 Reply)
Discussion started by: Rajesh Patil
1 Replies

8. Shell Programming and Scripting

Making bash script allways executable when transfer ?

Does it possible to make some bash script automatic to be a executable when transfered to another pc...? (5 Replies)
Discussion started by: tomislav91
5 Replies

9. Programming

Program or bash script to see total progress of copy

hi all, i want a program or to make a bash script to find out the total ETA/percent (would be nice aswell a progress bar) of a copy recursive command so lets say i do - cp -r /source_folder/ /destinatation_folder/ and when i run it i get no information on the screen of how the copy is... (20 Replies)
Discussion started by: robertkwild
20 Replies

10. Shell Programming and Scripting

Bash Scripting: Adding runtime in a progress bar

I have the following code that generates a progress bar and want to add the current execution time after the percentage value. The current execution time is stored in the variable `runtm` I am having a problem on how to add `runtm` in the last `printf` or after it. i=0; j=0 ... (3 Replies)
Discussion started by: kristinu
3 Replies
UI::Dialog::Backend::XOSD(3pm)				User Contributed Perl Documentation			    UI::Dialog::Backend::XOSD(3pm)

NAME
UI::Dialog::Backend::XOSD SYNOPSIS
use UI::Dialog::Backend::XOSD; my $xosd = new UI::Dialog::Backend::XOSD (); $xosd->line( text => "Something to display..."); ABSTRACT
UI::Dialog::Backend::XOSD is an OOPerl wrapper for the osd_cat(1) program. DESCRIPTION
Use this module to present feedback to the end user via an on-screen display (like an on-screen TV volume meter). When you use any of the UI::Dialog meta classes (UI::Dialog, UI::Dialog::GNOME, etc.) access to this backend is provided via the $d->xosd method. ie: replace $xosd with $d->xosd in the synopsis example (provided you made $d with something like my $d = new UI::Dialog...). Also, UI::Dialog (and friends) only load this module when you first use the $d->xosd method (this may silently fail, but you can test by ref() for success). EXPORT
None INHERITS
UI::Dialog::Backend CONSTRUCTOR
new( @options ) EXAMPLE my $xosd = new UI::Dialog::Backend::XOSD ( ); DESCRIPTION This is the Class Constructor method. It accepts a list of key => value pairs and uses them as the defaults when interacting with the various widgets. All methods accept the same arguments as new() except that the arguments passed to the methods are temporar- ily used instead of making them the default as the new() method does. In the case of the 'wait' option, any (non-zero) value enables the option as it's a switch and not a string argument. RETURNS A blessed object reference of the UI::Dialog::Backend::XOSD class. OPTIONS The (...)'s after each option indicate the default for the option. An * denotes support by all the widget methods on a per-use policy defaulting to the values decided during object creation. offset = d+(0) * align = w+ ('left') * indent = d+(0) * font = "x-font-string" ('fixed') * colour = w+ ('red') * delay = d+(5) * lines = d+(5) * shadow = d+(0) * age = d+(0) * wait = 0,1(0) * METHODS
1=head2 line( ) EXAMPLE $xosd->line( text => "some text to display" ); DESCRIPTION Display a simple string on the screen. RETURNS Nothing. file( ) EXAMPLE $xosd->file( file => "/path/to/a/file" ); DESCRIPTION Display a file on the screen. RETURNS Nothing. gauge( ) EXAMPLE $xosd->gauge( text => "", percent => $current_percentage, length => 40, bar => "-", mark => "|" ); DESCRIPTION Display a gauge bar with a percentage mark on the screen with an optional message. RETURNS Nothing. display_start( ) EXAMPLE $xosd->display_start( ); DESCRIPTION Opens a pipe command to the osd_cat(1) program for prolonged interactivity. This accepts all of the standard options but has nothing else to offer. The other display_*() methods (detailed below) return zero unless this method has been used and has cre- ated the command pipe. RETURNS TRUE(1) for success and FALSE(0) otherwise. display_text( ) EXAMPLE $xosd->display_start(); $xosd->display_text( "Some string to display." ); DESCRIPTION Uses the command pipe created by display_start() and prints the first argument to the screen. This method does not have any options, save the one string scalar. RETURNS TRUE(1) for success and FALSE(0) otherwise. display_gauge( ) EXAMPLE $xosd->display_start(); $xosd->display_gauge( 50, "display an optional text string." ); DESCRIPTION Uses the command pipe created by display_start() and prints a gauge identical to the regular (stand-alone) gauge() method. There are only to accepted arguments; the desired percentage and an optional text string. RETURNS TRUE(1) for success and FALSE(0) otherwise. display_stop( ) EXAMPLE $xosd->display_start(); $xosd->display_text( "about to stop!" ); $xosd->display_stop(); DESCRIPTION This closes the command pipe opened by the display_start() method. This method takes no arguments and performs only the task for closing and existing command pipe. RETURNS TRUE(1) for success and FALSE(0) otherwise. SEE ALSO
PERLDOC UI::Dialog UI::Dialog::Backend MAN FILES osd_cat(1) BUGS
Please email the author with any bug reports. Include the name of the module in the subject line. AUTHOR
Kevin C. Krinke, <kckrinke@opendoorsoftware.com> COPYRIGHT AND LICENSE
Copyright (C) 2003 Kevin C. Krinke <kckrinke@opendoorsoftware.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA perl v5.8.8 2004-08-01 UI::Dialog::Backend::XOSD(3pm)
All times are GMT -4. The time now is 04:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy