Sponsored Content
Top Forums Programming Program or bash script to see total progress of copy Post 303003554 by Corona688 on Friday 15th of September 2017 06:07:59 PM
Old 09-15-2017
How much data is it, and how fast are your disks?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

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... (1 Reply)
Discussion started by: ccox85
1 Replies

2. Homework & Coursework Questions

Run Program from Bash CGI-Script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: This is a problem I am having with my 2 semester senior project. I have a LAMP server running Ubuntu 9.10 with... (8 Replies)
Discussion started by: JMooney5115
8 Replies

3. Shell Programming and Scripting

bash script to copy files

hey everyone, new here i have arch setup and i am using smbnetfs to mount some windows shares in /mnt/smbnet what i want to do is copy files from my home dir to a dir in /mnt/smbnet but i also need it to remove files if i have deleted them from my home dir seems that cp would be the... (8 Replies)
Discussion started by: dodgefan67
8 Replies

4. Shell Programming and Scripting

Problem with bash shell script program

Hi, This is my program. #!/bin/bash today=`date +"%b-%d-%Y"` SERVICE="pbxconnect.php" if ; then echo "pbx program is running" else nohup php pbxconnect.php > logpbx-$today.txt & fi On executing using "sh myprogram.sh" , i get the following error. myprogram.sh: line 4: ' My... (7 Replies)
Discussion started by: gskumar1234
7 Replies

5. Shell Programming and Scripting

bash script to check if a program is running

I'm a bit new to bash programming and I was assigned the job of writing a script that will check to see if a program server is running and to restart the program if it is not up. The script is supposed to check the program every hour (which I have looked up and I believe I know how to do) and send... (3 Replies)
Discussion started by: mcknz
3 Replies

6. UNIX for Dummies Questions & Answers

Bash script to execute a program to rename files

I just can't figure it out , so please just give me a pice of advise how to: The existing Linux program foo2bar takes as its only argument the name of a single foo file and converts it to an appropriately-named bar file. Provide a script that when executed will run foo2bar against all foo... (4 Replies)
Discussion started by: raymen
4 Replies

7. Shell Programming and Scripting

Bash script to start program and answer prompts?

I'm trying to write a script the simplifies the execution of a program: After starting the program (sh ~/.mfix/model/make_mfix) I am prompted four times for options: Do you need SMP version? (y/n) Do you need DMP version? (y/n) Do you need debug version? (y/n) Force re-compilation of... (2 Replies)
Discussion started by: lanew
2 Replies

8. Programming

Putting bash script in C program

suppose i have a bash script: #!/bin/bash echo "hello" echo "how are you" echo "today" how can i put the entire script above into a basic c program? i do not want to translate the bash code to a c code. i want C to run the bash code. is this possible? i found this on the... (15 Replies)
Discussion started by: SkySmart
15 Replies

9. UNIX for Dummies Questions & Answers

Running a C/C++ program and/or bash script from a server

I wish to be able to give to a client the opportunity to : 0) Turn one of my ubuntu computers into a webserver 1) See a webpage after visiting a url where an external user/client can set a couple of variables (e.g. Number1= ?, Number2=?) 2) By pressing "run" the program runs on my machine 3)... (1 Reply)
Discussion started by: frad
1 Replies

10. UNIX for Beginners Questions & Answers

Bash script to get total size off of remainder calculated

I am working on a script to get the final total size and so far have the following and wondering if this can be improved. # Compare the desired size of each lvm to the standard size. If it is desired is larger than calculate the difference and keep that value as the amount to add to that LVM. ... (5 Replies)
Discussion started by: user3528
5 Replies
DEBCONF-APT-PROGRESS(1) 					      Debconf						   DEBCONF-APT-PROGRESS(1)

NAME
debconf-apt-progress - install packages using debconf to display a progress bar SYNOPSIS
debconf-apt-progress [--] command [args ...] debconf-apt-progress --config debconf-apt-progress --start debconf-apt-progress --from waypoint --to waypoint [--] command [args ...] debconf-apt-progress --stop DESCRIPTION
debconf-apt-progress installs packages using debconf to display a progress bar. The given command should be any command-line apt frontend; specifically, it must send progress information to the file descriptor selected by the "APT::Status-Fd" configuration option, and must keep the file descriptors nominated by the "APT::Keep-Fds" configuration option open when invoking debconf (directly or indirectly), as those file descriptors will be used for the debconf passthrough protocol. The arguments to the command you supply should generally include -y (for apt-get or aptitude) or similar to avoid the apt frontend prompting for input. debconf-apt-progress cannot do this itself because the appropriate argument may differ between apt frontends. The --start, --stop, --from, and --to options may be used to create a progress bar with multiple segments for different stages of installation, provided that the caller is a debconf confmodule. The caller may also interact with the progress bar itself using the debconf protocol if it so desires. debconf locks its config database when it starts up, which makes it unfortunately inconvenient to have one instance of debconf displaying the progress bar and another passing through questions from packages being installed. If you're using a multiple-segment progress bar, you'll need to eval the output of the --config option before starting the debconf frontend to work around this. See "EXAMPLES" in the EXAMPLES section below. OPTIONS
--config Print environment variables necessary to start up a progress bar frontend. --start Start up a progress bar, running from 0 to 100 by default. Use --from and --to to use other endpoints. --from waypoint If used with --start, make the progress bar begin at waypoint rather than 0. Otherwise, install packages with their progress bar beginning at this "waypoint". Must be used with --to. --to waypoint If used with --start, make the progress bar end at waypoint rather than 100. Otherwise, install packages with their progress bar ending at this "waypoint". Must be used with --from. --stop Stop a running progress bar. --no-progress Avoid starting, stopping, or stepping the progress bar. Progress messages from apt, media change events, and debconf questions will still be passed through to debconf. --dlwaypoint percentage Specify what percent of the progress bar to use for downloading packages. The remainder will be used for installing packages. The default is to use 15% for downloading and the remaining 85% for installing. --logfile file Send the normal output from apt to the given file. --logstderr Send the normal output from apt to stderr. If you supply neither --logfile nor --logstderr, the normal output from apt will be discarded. -- Terminate options. Since you will normally need to give at least the -y argument to the command being run, you will usually need to use -- to prevent that being interpreted as an option to debconf-apt-progress itself. EXAMPLES
Install the GNOME desktop and an X window system development environment within a progress bar: debconf-apt-progress -- aptitude -y install gnome x-window-system-dev Install the GNOME, KDE, and XFCE desktops within a single progress bar, allocating 45% of the progress bar for each of GNOME and KDE and the remaining 10% for XFCE: #! /bin/sh set -e case $1 in '') eval "$(debconf-apt-progress --config)" "$0" debconf ;; debconf) . /usr/share/debconf/confmodule debconf-apt-progress --start debconf-apt-progress --from 0 --to 45 -- apt-get -y install gnome debconf-apt-progress --from 45 --to 90 -- apt-get -y install kde debconf-apt-progress --from 90 --to 100 -- apt-get -y install xfce4 debconf-apt-progress --stop ;; esac RETURN CODE
The exit code of the specified command is returned, unless the user hit the cancel button on the progress bar. If the cancel button was hit, a value of 30 is returned. To avoid ambiguity, if the command returned 30, a value of 3 will be returned. AUTHORS
Colin Watson <cjwatson@debian.org> Joey Hess <joeyh@debian.org> 2011-06-22 DEBCONF-APT-PROGRESS(1)
All times are GMT -4. The time now is 03:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy