Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Using tee command with ablity to provide input for prompts Post 303007846 by Peasant on Wednesday 22nd of November 2017 11:27:37 AM
Old 11-22-2017
There is also an option running in screen session logging the output.
Code:
screen -L -Logfile $HOME/mysession.log -S yumscreen
# do your update
exit

Look for the file $HOME/mysession.log or log/path you require.

You will also benefit in screen if your network connection breaks or similar issues .. turn off putty by accident Smilie
The process will continue to run and can be attached again.

It is a great tool and comes on most operating systems.

Hope that helps
Regards
Peasant.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script providing input to application prompts

Hi! I want to write a script that will create an archive (via tar) that will restrict the size of the tar file. The size can be constrained using the keyword 'k' and providing the size restriction. The problem is that the script needs to know (detect) when the tar command prompts the user (which... (2 Replies)
Discussion started by: mitch8
2 Replies

2. Shell Programming and Scripting

log script input and output using tee ?

hi, new to to forum... i've been trying to create a script in tcsh but i'm having a problem with one thing... the script has to keep log of it's input and output so i'm using tee -a log | script | tee -a log this keeps the logs as asked, but it gives me an extra empty prompt (not in the... (0 Replies)
Discussion started by: moseschrist
0 Replies

3. Shell Programming and Scripting

running a command without having to provide the path

ok, i am aware of adding the directory where the files are located into the .profile file but the problem is, its not working for me. can someone please spell out how to properly edit these configuration files so i can run a command anywhere on the system without having to be in the... (2 Replies)
Discussion started by: Terrible
2 Replies

4. Solaris

pkgadd pkgask still prompts for user input

I create a succesful pkgask 'response' file: pkgask -r xyz.pkg I then attempt to use the 'response' file with pkgadd: pkgadd -nr /home/user/response -d /home/user/xyz.pkg the prompts for user input still appear. I have also tried an 'admin' file but that still prompts for user input as... (1 Reply)
Discussion started by: prkfriryce
1 Replies

5. Shell Programming and Scripting

tee + more command

script1: #!/bin/ksh more test.txt script2: calling the script1 #!/bin/ksh /tmp/script1.sh 2>&1 | tee tee.log where test.txt contains ~1200 lines. When I execute the script2 the more command does not print pagewise it goes to the end of the line, when I remove the tee command it... (4 Replies)
Discussion started by: prasad111
4 Replies

6. Shell Programming and Scripting

Provide input in sqlplus script

Hi guys. I m creating scripts which input multiple value , inside sqlplus script when it prompt/accept do anybody know how to provide multiple value inside sqlplus script when it prompt. like, enter value for first: enter value for second: enter value "save file as " : I m try... (11 Replies)
Discussion started by: tapia
11 Replies

7. UNIX for Advanced & Expert Users

Equivalents of tee command to find exit status of command

Hi, Want to log the output of command & check the exit status to find whether it succeeded or failed. > ls abc ls: abc: No such file or directory > echo $? 1 > ls abc 2>&1 | tee log ls: abc: No such file or directory > echo $? 0 Tee commands changes my exit status to be always... (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies

8. Shell Programming and Scripting

how to run a command line with another user without prompts for password

Hi, I'm writing a script, in the script I need to use tcpdump to capture some packets however it needs root priviledge my computer is configured by school and I have no real root priviledge so I can't use sudo on my computer,like Code: sudo tcpdump ...... I have to use a limited... (1 Reply)
Discussion started by: esolve
1 Replies

9. Shell Programming and Scripting

Help with tee command

In the current directory , I have seven files . But when I use the following command , it lists eight files ( 7 files + file_list.xtx) ls -1 | tee file_list.xtx | while read line; do echo $line ; done Does the tee command create the file_list.xtx file first and then executes the ls -1... (1 Reply)
Discussion started by: kumarjt
1 Replies

10. Shell Programming and Scripting

Provide 2 inputs when prompts

Hi All, I am a novice to UNIX, i need to know is there a way to provide 2 inputs when the shell prompts and i need to assign those 2 values to 2 separate variables. I dont want to give those values as a arguments (while running the script). Thanks in advance!! (1 Reply)
Discussion started by: prasanna2166
1 Replies
Log::Dispatch::Configurator::AppConfig(3pm)		User Contributed Perl Documentation	       Log::Dispatch::Configurator::AppConfig(3pm)

NAME
Log::Dispatch::Configurator::AppConfig - Configurator implementation with AppConfig SYNOPSIS
use Log::Dispatch::Config; use Log::Dispatch::Configurator::AppConfig; my $config = Log::Dispatch::Configurator::AppConfig->new('log.cfg'); Log::Dispatch::Config->configure($config); # nearby piece of code my $log = Log::Dispatch::Config->instance; DESCRIPTION
Log::Dispatch::Configurator::AppConfig is an implementation of Log::Dispatch::Configurator using AppConfig format. Here is a sample of config file. dispatchers = file screen file.class = Log::Dispatch::File file.min_level = debug file.filename = /path/to/log file.mode = append file.format = [%d] [%p] %m at %F line %L%n screen.class = Log::Dispatch::Screen screen.min_level = info screen.stderr = 1 screen.format = %m You can use ini style grouping. [file] class = Log::Dispatch::File min_level = debug [screen] class = Log::Dispatch::Screen min_level = info If you use _ (underscore) in dispatcher name, something very bad may happen. It is safe when you avoid doing so. AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Log::Dispatch::Config, AppConfig perl v5.14.2 2010-02-05 Log::Dispatch::Configurator::AppConfig(3pm)
All times are GMT -4. The time now is 02:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy