Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Logging Command Line and Output in Unix Post 302340546 by ilikecows on Monday 3rd of August 2009 10:06:31 PM
Old 08-04-2009
I have been working with linux/unix machines for years and have never seen that script command. That is quite handy. Thank you. That will save me a lot of time taking notes and producing documentation for users new to UNIX.

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

reading ps command's output line by line

hi; as a pseudo; while read psLine do myFunc $psLine done < ps i don't want to redirect ps command's to a file. in fact, my problem is "how can i read stdout line by line in bash, sed, awk or any?" thanks, (5 Replies)
Discussion started by: s. murat
5 Replies

2. Shell Programming and Scripting

Logging Remote SSH command (cannot log a java output)

Hi all I'm creating a script that runs a few commands on some boxes and everything can be logged EXCEPT the java -version command, there doesn't seem to be any output... Can anyone help explain why this does not work? Do I need to do something extra to append the output from the java... (3 Replies)
Discussion started by: Keepcase
3 Replies

3. Shell Programming and Scripting

Bash - Loading a command's output line by line into an array

I have been trying this a lot of different ways and haven't found too much online. Here's what I've got so far: j=0 declare -a first zero=(`cat $tmpfile`) for i in "${zero}" do command $i >> "${first}" ... (4 Replies)
Discussion started by: Azrael
4 Replies

4. Shell Programming and Scripting

Can we get output on ls | wc -l command on the same line?

can we get o/p of ls | wc - l command on the same line. # ls nc*010412* | wc -l 23 # ls nc*010412* | wc -l 24 # ls nc*050412* | wc -l 21 # ls nc*040412* | wc -l 23 # ls nc*070412* | wc -l 22 my expectation is grepping specific lines from the file and... (8 Replies)
Discussion started by: sagar_1986
8 Replies

5. UNIX for Advanced & Expert Users

Not logging ftp connections in /var/adm/wtmpx file (in last command output)

Hi all, I have F5 load balancer on my system and checking service status by opening an ftp session in every 30 seconds. These ftp sessions are being logged in /var/adm/wtmpx and filling up the file. when i run the last command most of the output is this ftp session. I was wondering if there is a... (1 Reply)
Discussion started by: cepxat
1 Replies

6. Shell Programming and Scripting

sed command to replace a line in a file using line number from the output of a pipe.

Sed command to replace a line in a file using line number from the output of a pipe. Is it possible to replace a whole line piped from someother command into a file at paritcular line... here is some basic execution flow.. the line number is 412 lineNo=412 Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies

7. OS X (Apple)

Does there exist a UNIX command to prevent docs' versions from uncontrolled erasing on logging in?

So far nobody on ASC, nor anywhere was able to respond to my issue and Google wasn't much of help either. I started to experience the issue some time ago: my OS is Lion 10.7.5. It occurs in all apps that have the function of versioning (iWork which I have updated up to v9.2, namely, Pages 4.2,... (0 Replies)
Discussion started by: scrutinizerix
0 Replies

8. Shell Programming and Scripting

How to execute a command on each line of output from another command?

Hello :) new to bash not to programming. I have an on-going need to change the owning group on sets of files and directories from the one they were created with or changed to on update to the one they need to have going forward. find {target_root} -group wrong_group gets me a newline... (4 Replies)
Discussion started by: naftali
4 Replies

9. Shell Programming and Scripting

How to read the output of a command line by line and pass it as a variable?

Hi, I have some 2000 names in a table like below. Java Oracle/SQL ANSI SQL SQL,DWH,DB DB&Java And by using for loop in my code i am able to get a single word but if there is any special character or space then it is considering as a next line. I have to execute the below queries in... (10 Replies)
Discussion started by: Samah
10 Replies
Log::Handler::Output::Screen(3pm)			User Contributed Perl Documentation			 Log::Handler::Output::Screen(3pm)

Log::Handler::Output::Screen - Log messages to the screen. SYNOPSIS
use Log::Handler::Output::Screen; my $screen = Log::Handler::Output::Screen->new( log_to => "STDERR", dump => 1, ); $screen->log($message); DESCRIPTION
This output module makes it possible to log messages to your screen. METHODS
new() Call "new()" to create a new Log::Handler::Output::Screen object. The following options are possible: log_to Where do you want to log? Possible is: STDOUT, STDERR and WARN. WARN means to call "warn()". The default is STDOUT. dump Set this option to 1 if you want that the message will be dumped with "Data::Dumper" to the screen. log() Call "log()" if you want to log a message to the screen. Example: $screen->log("this message goes to the screen"); validate() Validate a configuration. reload() Reload with a new configuration. errstr() This function returns the last error message. PREREQUISITES
Data::Dumper Params::Validate EXPORTS
No exports. REPORT BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>. If you send me a mail then add Log::Handler into the subject. AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>. COPYRIGHT
Copyright (C) 2007-2009 by Jonny Schulz. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-11-21 Log::Handler::Output::Screen(3pm)

Featured Tech Videos

All times are GMT -4. The time now is 06:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy