While working on TUI for scripts, there there came the idea to' add a command' for dd too.
That was, after 'wrapping' tar and wget either, to display their growing size and return the exit code with a textual-visual-feedback to the user.
Now displaying the filesize of a tarball or a file that is downoaded during a loop is quite easy.
What i'd like to get is the value of how many times BS (as in bytesize) has been written.
The full script is: Note that tui-printf & tui-status can be replaced by 'printf' or 'echo'
tui-indi prints on each call the following of its previous -/|\ source tui loads in the configuration files/default variables not defined in this script.
Which works like it should.
According to the manpage, one's supposed to get job's info by:
Quote:
Originally Posted by man dd
Sending a USR1 signal to a running 'dd' process makes it print I/O statistics to standard
error and then resume copying.
So i've changed accordingly:
(removed because outdated)
Problem now is:
I hoped redirecting the stderr to a variable would keep DD quite...
How could i achieve this?
---------- Post updated at 16:39 ---------- Previous update was at 15:14 ----------
According to the manpages, this is supposed to work:
Quote:
Originally Posted by man bash
Note that the order of redirections is significant. For example, the command
ls > dirlist 2>&1
directs both standard output and standard error to the file dirlist, while the command
ls 2>&1 > dirlist
directs only the standard output to file dirlist, because the standard error was dupli‐
cated from the standard output before the standard output was redirected to dirlist.
I would suspect more kill than dd... ( Last time I tried a kill fancy option I finished going in the white room to restart to box I lost control on...)
Pure silence (fail)
Full spam (fail):
Meaning:
All i want to achieve is "NO 'plain-dd' output" as above, but only this part: "0 bytes (0 B) copied" so i can print it on 1 line, 'staying' that very 1 line to the user, without the console spammed.
As in $tmp contains only "20mb" -- "25mb" -- "50mb" ...
Once i could 'mute' the DD output to the user, but still retrieve the values, even with the 0+0 records, i could 'cut' it down to the value needed, but this redirection stuff drives me crazy!!
Hi,
I want to write a script which continuously checking status of a script running in background by nohup command. And if same script is not running then immediately start the script...please help..
i am using below command to run script
nohup system_traps.sh &
but in some... (9 Replies)
Hi,
Should the user jobs specified in crontab be running in background?
Cron daemon is already running in background. So I am not sure
whether should the jobs (output and error messages are redirected to file)
ran by it be explicitly stated to be run in background (& at end of command)
if one... (1 Reply)
Is there a way to suspend (TSTP?) a job that is running in the background, _without_ first bringing it to the foreground and inputting Ctrl-Z from the keyboard?
IOW, something similar to issuing the shell's bg builtin command on a job ID to resume a job that is suspended in the background,... (2 Replies)
Hi All,
I have a scenario where I am executing some child shell scripts in background (using &)through a master parent script.
Is there a way I can capture the exit status of each individual child script after the execution is completed. (2 Replies)
Hello,
I am running a shell script whose execution often takes several hours to complete. Is there way I can get some kind of status update as the job is running? Something as simple as the start and the current time stamp.
Thanks,
Gussi (2 Replies)
Guys,
We use AIX 5.3 at our work place. I only in my team have a strange problem of not able run jobs background. Other colleagues are able to run without any problem.
Once I kick off background job using nohup and & command, It immediately stops. The following error I get when I run.
... (2 Replies)
I have run one shell script in background that contains a endless while loop.
I am not able to know the status of that job .
Please provide any command to know this. I have already used "ps -aef" , "jobs" to know it , but it didn't work. I am sure the process is running as it is generating a file... (8 Replies)
Hi all,
I am running a job .. and i want to know the status tht it is runnig or not ..
and how can i find the jobId of my job ..
I have to get it to kill my running job
Pls let me know da Unix commands to do it ..
i m wrking on Hp UNIX (1 Reply)
Hiya,
Recently I've run a few scripts in the foreground, but have realised later they should of been better nohup'd and placed in the background. I understand how to change a foreground job into a background one, but how would put the job into the nohup state?
Thanks (1 Reply)