Sponsored Content
Top Forums Shell Programming and Scripting command output to variable assignment and screen simultaneously Post 302357100 by jlliagre on Monday 28th of September 2009 05:20:48 PM
Old 09-28-2009
Code:
output=$(time /usr/local/bin/rsync -via /path/to/sync/ rsync://host1/destination" 2>&1 | tee /dev/tty)

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Seeing the screen output beyond the scroll capability for the last run command

HI , I forgot to redirect my op to a file.The op which is quite huge , thus printed on the screen.However bcoz of the limited viewing in the screenI can not see the whole of the output.. Is there anyway I can see the full op.My run takes half a day for finnishing ..So I am refraining... (1 Reply)
Discussion started by: bimukt
1 Replies

2. UNIX for Dummies Questions & Answers

Command display output on console and simultaneously save the command and its output

Hi folks, Please advise which command/command line shall I run; 1) to display the command and its output on console 2) simultaneous to save the command and its output on a file I tried tee command as follows; $ ps aux | grep mysql | tee /path/to/output.txt It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies

3. Shell Programming and Scripting

assignment to variable from eval command

Hi Gurus, I am having 2 parameters as below parm1=value1 parm2=parm1 I want to evaluate parm1 value using eval echo \$$parm2 and later i want to assign this value to other variable which i will be using in if statement like : if ]; then do this....... fi could you please suggest... (5 Replies)
Discussion started by: k_vikash
5 Replies

4. Shell Programming and Scripting

zenity progress and simultaneously terminal output

Hi, I want to use zenity --progress and also put the output to the terminal. I tried using the tee command but that puts the output to the terminal first and then shows the zenity progress dialog. Take the normal example by the gnome manual: ( echo "10" ; sleep 1 ... (0 Replies)
Discussion started by: sikku
0 Replies

5. Red Hat

command line tool to disable screen lock and/or screen saver

Hi, I have a simple question : how to disable screen lock and/or sreen saver with command line with RHEL5.4 ? (1 Reply)
Discussion started by: albator1932
1 Replies

6. Shell Programming and Scripting

Screen output is blocked by "| tee" command

BACK STORY: I have a script build.py . (It's for creating the ISO file for a special edition of Swift Linux.) This build.py script executes the mintConstructor.py script that I use to modify the Regular Swift Linux ISO to get the special edition Swift Linux ISO. The lines of the script that... (2 Replies)
Discussion started by: swiftlinux
2 Replies

7. Shell Programming and Scripting

Redirect an output from a script to a file and display it at a console simultaneously

Hi, I'd like to redirect the STDOUT output from my script to a file and simultaneously display it at a console. I've tried this command: myscript.sh | tail -f However, it doesn't end after the script finishes running I've also tried this: myscript.sh | tee ~/results.txt But it writes... (3 Replies)
Discussion started by: wenclu
3 Replies

8. Solaris

Looking to understand what this command $$ does in variable assignment?

Hi Folks, I'm looking to figure something out in an existing script I'm trying to understand. the command in question(on a Solaris Box using KSH) is: WORKDIR=/tmp/namereplaced.exec.$$.$RANDOM Now, I know it's setting the $workdir environmental variable... And I understand most of... (2 Replies)
Discussion started by: Marc G
2 Replies

9. UNIX for Dummies Questions & Answers

Send output of command to screen and to multiple files

Hi there, I'm a newbie to Unix (taking a course in it right now) and I don't know how to do the following in bash: I need to write a command to display information about the used and free space on the file system, showing only local file systems, and then send the output of the command to... (1 Reply)
Discussion started by: damianberry
1 Replies

10. Shell Programming and Scripting

Trouble with variable and command assignment

I have a section of a script where I want to check a log file for a certain oracle error and if there is only one error (and it is ORA-39152) then I want to email that script is complete. Otherwise email failure and log. Somehow with this while the log only has one error and it is ORA-39152, I... (5 Replies)
Discussion started by: cougartrace
5 Replies
rsync_selinux(8)					rsync Selinux Policy documentation					  rsync_selinux(8)

NAME
rsync_selinux - Security Enhanced Linux Policy for the rsync daemon DESCRIPTION
Security-Enhanced Linux secures the rsync server via flexible mandatory access control. FILE_CONTEXTS SELinux requires files to have an extended attribute to define the file type. Policy governs the access daemons have to these files. If you want to share files using the rsync daemon, you must label the files and directories public_content_t. So if you created a special directory /var/rsync, you would need to label the directory with the chcon tool. chcon -t public_content_t /var/rsync To make this change permanent (survive a relabel), use the semanage command to add the change to file context configuration: semanage fcontext -a -t public_content_t "/var/rsync(/.*)?" This command adds the following entry to /etc/selinux/POLICYTYPE/contexts/files/file_contexts.local: /var/rsync(/.*)? system_u:object_r:publix_content_t:s0 Run the restorecon command to apply the changes: restorecon -R -v /var/rsync/ SHARING FILES
If you want to share files with multiple domains (Apache, FTP, rsync, Samba), you can set a file context of public_content_t and pub- lic_content_rw_t. These context allow any of the above domains to read the content. If you want a particular domain to write to the pub- lic_content_rw_t domain, you must set the appropriate boolean. allow_DOMAIN_anon_write. So for rsync you would execute: setsebool -P allow_rsync_anon_write=1 BOOLEANS
system-config-selinux is a GUI tool available to customize SELinux policy settings. AUTHOR
This manual page was written by Dan Walsh <dwalsh@redhat.com>. SEE ALSO
selinux(8), rsync(1), chcon(1), setsebool(8), semanage(8) dwalsh@redhat.com 17 Jan 2005 rsync_selinux(8)
All times are GMT -4. The time now is 08:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy