05-28-2012
The rsync command I am using is :
rsync -Sz --append --bwlimit= --progress --verbose -e ssh /tmp/Image-15.img root@localhost11::imgxfer/ 2>error.log | /tmp/rsync-progress.sh localhost11 >process.log
when I enter grep -ef | grep rsync I got the following lines which shows the the contents of script.
root 5774 5771 0 09:05 pts/0 00:00:00 sed --unbuffer ? # Get rid .............
root 5775 5771 0 09:05 pts/0 00:00:00 expect -- /opt/IBM/ITM/lx8266/53/bin/53-unbuffer -p awk ? BEGIN {.........
root 5777 5775 0 09:05 pts/7 00:00:00 awk ? BEGIN { FS = " "; startTi..........
The above all programs has been written into a single script "rsync-progress.sh" which is called as :
"$PROGDIR/53-unbuffer" -p tr '\r' '\n' | sed --unbuffer "$sedProgram" | "$PROGDIR/53-unbuffer" -p awk "$awkProgram" >> "$logFile"
Here, "$sedProgram" is being replaced by all the code and displayed on ps -ef. same happens with awk and expect scripts. How could I supress the printing of content of varible in ps -ef?
Last edited by rajeevra; 05-28-2012 at 11:27 AM..
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Everyone , have a nice day
root@sdp01a>SS7Manager -status
the problem with above given expression is that i cant add it in script , it only executes if manually given at remote node , can anyone tell me some way to run it in scripts , also i have few more commands aswell , which are for... (2 Replies)
Discussion started by: Dastard
2 Replies
2. Shell Programming and Scripting
hi..
i have one perl script called sendsms.pl. After i execute the perl script as background process and run ps -ef, it did not display the filename. It was display as "/usr/bin/perl". How could execute the perl program and display the filename using ps command ?
#./sendsms &
#ps -ef |grep... (3 Replies)
Discussion started by: bh_hensem
3 Replies
3. UNIX and Linux Applications
hi All,
we have a script to remove the files from particular path,when we tryingto run manually the script went to success and removed the files but the same script which is running by other team it got failed and giving the error "2 (RC)2 "..what is the cause of the failure..and we passing the... (2 Replies)
Discussion started by: nagavenkatesh
2 Replies
4. UNIX for Dummies Questions & Answers
Suppose I am a Unix user, not a root.
I can see all commands in running by ps -elf, or some similar commands. Such commands may be submit by other Unix users.
Is there a way that I can display those commands with their full parameters/options. For example, I can see a user is running "ls"... (3 Replies)
Discussion started by: happy_lotus
3 Replies
5. Shell Programming and Scripting
There's a JavaScript file that I call from command line (there's a framework) like so:
./RunDiag.js param1:'string one here' param2:'string two here'
I have a shell script where I invoke the above command. I can run it in a script as simple as this
#!/bin/bash
stuff="./RunDiag.js... (4 Replies)
Discussion started by: AcerAspirant
4 Replies
6. Solaris
Hello all,
I have a sun server SunOS PNR1RAD01 5.10 Generic_144488-09 sun4v sparc SUNW,Netra-T5220 where i have an interface e100g0.
This was earlier in running state but now this doesnt show running state. I tried to reset the interface, checked the cable but it did not help.
Can nyone pls... (10 Replies)
Discussion started by: rajjat2
10 Replies
7. Shell Programming and Scripting
My cron file. Copied $PATH
# Minute Hour Day of Month Month Day of Week Command
SHELL=/bin/ksh
PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/perl/lib:/perl/lib/lib/perl5:/perl/scripts:.:/perl/lib/local:/home/popeye:/temp
0... (3 Replies)
Discussion started by: popeye
3 Replies
8. Solaris
Hi,
This is Solaris-10 on Sparc. Due to some reason, one zpool size is showing 100% full, while nothing is there in that. dstr03-zone02 is a non global zone running on physical machine - dstr03
root@dstr03:/# df -h | grep -i zone02
zone02_app_pool 60G 31K 3.8G 1% ... (5 Replies)
Discussion started by: solaris_1977
5 Replies
9. HP-UX
I have 4 HPUX 11.31 servers with the same Quality Pack bundles. "AS FAR AS I CAN TELL" no system files have been modified.
/usr/bin/ps is the same date size and creation date
terminfo file (x-->xterm) is the same date size and creation date
shell (ksh) is the same date size and creation date
... (4 Replies)
Discussion started by: mrmurdock
4 Replies
LEARN ABOUT DEBIAN
expect_unbuffer
UNBUFFER(1) General Commands Manual UNBUFFER(1)
NAME
unbuffer - unbuffer output
SYNOPSIS
unbuffer program [ args ]
INTRODUCTION
unbuffer disables the output buffering that occurs when program output is redirected from non-interactive programs. For example, suppose
you are watching the output from a fifo by running it through od and then more.
od -c /tmp/fifo | more
You will not see anything until a full page of output has been produced.
You can disable this automatic buffering as follows:
unbuffer od -c /tmp/fifo | more
Normally, unbuffer does not read from stdin. This simplifies use of unbuffer in some situations. To use unbuffer in a pipeline, use the
-p flag. Example:
process1 | unbuffer -p process2 | process3
CAVEATS
unbuffer -p may appear to work incorrectly if a process feeding input to unbuffer exits. Consider:
process1 | unbuffer -p process2 | process3
If process1 exits, process2 may not yet have finished. It is impossible for unbuffer to know long to wait for process2 and process2 may
not ever finish, for example, if it is a filter. For expediency, unbuffer simply exits when it encounters an EOF from either its input or
process2.
In order to have a version of unbuffer that worked in all situations, an oracle would be necessary. If you want an application-specific
solution, workarounds or hand-coded Expect may be more suitable. For example, the following example shows how to allow grep to finish pro-
cessing when the cat before it finishes first. Using cat to feed grep would never require unbuffer in real life. It is merely a place-
holder for some imaginary process that may or may not finish. Similarly, the final cat at the end of the pipeline is also a placeholder
for another process.
$ cat /tmp/abcdef.log | grep abc | cat
abcdef
xxxabc defxxx
$ cat /tmp/abcdef.log | unbuffer grep abc | cat
$ (cat /tmp/abcdef.log ; sleep 1) | unbuffer grep abc | cat
abcdef
xxxabc defxxx
$
BUGS
The man page is longer than the program.
SEE ALSO
"Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs" by Don Libes, O'Reilly and Associates, January 1995.
AUTHOR
Don Libes, National Institute of Standards and Technology
1 June 1994 UNBUFFER(1)