Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-30-2008, 02:07 PM   #1
Registered: Apr 2004
Distribution: redhat 9.0, fc4, redhat as 4
Posts: 522

Rep: Reputation: 31
status of running process

i would like to ask the forum, how do i get "###..." hash marks of remaing time/percent of script.


if a script take 10-25 minutes to complete, end user should see the completion bar on screen.

any idea to this in bash script.

Old 08-30-2008, 04:12 PM   #2
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
There is no automatic way to do this. You have to program your script to print such output.

Say your scrip iterates over a list of files, it would have to print a parm every so many iterations, so that total bar size will reach the end as the script finishes.

You can move the cursor back to the beginning of the line by printing the right number of backspace characters. This maps it possible to re-draw the bar, but you have to manually keep track of how many backspaces to print.
Old 09-01-2008, 01:55 AM   #3
Registered: Aug 2008
Location: Dubai, UAE
Distribution: CentOS
Posts: 40
Blog Entries: 13

Rep: Reputation: 15
time ls -a
this will gave you total time in which ls -a command can execute

time command

do you want this?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Process Status D webee Linux - General 10 05-13-2016 03:20 PM
update-status Process? Harpo SUSE / openSUSE 3 02-04-2009 11:22 AM
how can I monitor all pthread status inside a running process valpa Programming 2 08-26-2008 10:54 PM
Getting a child process status (C) smoothdogg00 Programming 2 04-29-2006 11:49 AM
how to get process status using pid? hongxing Linux - Software 2 04-11-2006 07:11 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:56 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration