Sponsored Content
Top Forums Shell Programming and Scripting implicitly redirecting stdout to a file Post 302237483 by ALTRUNVRSOFLN on Wednesday 17th of September 2008 06:02:37 PM
Old 09-17-2008
Error implicitly redirecting stdout to a file

Is there a way to redirect all stdout to a file implicitly - like defining stdout=/home/me/process.log - so that all "echo" commands in several scripts/subscripts are written to that file; instead of having to edit all scripts to redirect the "echo" (e.g. echo 'This is a test ' >> =/home/me/process.log)?
ALTRUNVRSOFLN
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Redirecting STDERR message to STDOUT & file at same time

Friends I have to redirect STDERR messages both to screen and also capture the same in a file. 2 > &1 | tee file works but it also displays the non error messages to file, while i only need error messages. Can anyone help?? (10 Replies)
Discussion started by: vikashtulsiyan
10 Replies

2. Shell Programming and Scripting

Redirecting part of output to stdout

Hi, I am trying to execute a command like this: find ./ -name "*.gz" -exec sh -c 'zcat {} | awk -f parse.awk' \; >> output If I want to print the filename, i generally use the -print argument to the find command but when I am redirecting the output to a file, how can I print just the... (2 Replies)
Discussion started by: Legend986
2 Replies

3. UNIX for Dummies Questions & Answers

Redirecting several outputs to /dev/stdout

I have an executable that, depending on its input, outputs to either one file or several. It usually prints nothing on screen. The usual way to call this program is to specify an input and output filenames, like this: ./executable.exe -i inputfile -o outputfileIt will then try to use the output... (1 Reply)
Discussion started by: aplaydoc
1 Replies

4. Shell Programming and Scripting

Redirecting stdout to variable while printing it

Hi everybody, I am trying to do the thing you see in the title, and I can't simply do a=$(svn up) echo $a because the program (svn) gives output on lots of lines and in the variable the output is stored on only one line (resulting in a horribly formatted text). Any tips? Thanks,... (2 Replies)
Discussion started by: ocirne94
2 Replies

5. Shell Programming and Scripting

Redirecting stdout problem

I have a simple bash script that prints sth every 5 seconds. What I do is the following. I redirect the output of the script to a file, tail the file and see that it works and then from another console I delete the file where the output is redirected to. Even though I have deleted the file, the... (2 Replies)
Discussion started by: igurov
2 Replies

6. Shell Programming and Scripting

Redirecting stdout continously to a file

I have a C program that continously outputs info to stdout. The problem is that I am redirecting the stdout and stderr to a file and stdout is written at the end of the problem rather than continously to the file. This could be a problem if for example the program is killed and the stdout output is... (3 Replies)
Discussion started by: igurov
3 Replies

7. Shell Programming and Scripting

File descriptors, redirecting output, and stdout

Hello all. I've been lurking here for a year or two and finally decided to post. I need some assistance with file descriptors, stdout, and redirecting output. I've searched through a number of very helpful threads here (unfortunately I can't link to any of them yet due to my low post count...),... (2 Replies)
Discussion started by: Michael_K
2 Replies

8. Shell Programming and Scripting

Redirecting STDERR to file and screen, STDOUT only to file

I have to redirect STDERR messages both to screen and also capture the same in a file but STDOUT only to the same file. I have searched in this formum for a solution, but something like srcipt 3>&1 >&2 2>&3 3>&- | tee errs doesn't work for me... Has anyone an idea??? (18 Replies)
Discussion started by: thuranga
18 Replies

9. Shell Programming and Scripting

Redirecting stdion, stdout within an AT command

Hello, I'm strugling with some redirecting and all help is apreciated. The following program is working as expected, but the result of the AT command doesn't go to any file. Thanks in advance for the help. #!/bin/bash modem=/dev/ttyUSB1 file=/root/imsi.txt # print error to stderr and exit... (4 Replies)
Discussion started by: cleitao
4 Replies

10. UNIX for Dummies Questions & Answers

Redirecting stdout inside a loop

hi, OK. I am writing a bash script, and it is almost working for me. Problem 1: I currently have stout sent to a file (stout.miRNA.bash.$date_formatted) which I would like to have work inside my loop, but when I move it, it just prints to the screen. Problem 2: I have a second file... (18 Replies)
Discussion started by: hmortens
18 Replies
FLVTOOL2(1)						      General Commands Manual						       FLVTOOL2(1)

NAME
flvtool2 - a manipulation tool for flash video files SYNOPSIS
flvtool2 [-ACDPUVaciklnoprstvx]...[-key:value]...in-path|stdin[out-path|stdout] DESCRIPTION
If out-path is omitted, in-path will be overwritten. In-path can be a single file, or a directory. If in-path is a directory, out-path has to be likewise, or can be omitted. Directory recursion is controlled by the -r switch. You can use stdin and stdout keywords as in- and out-path for piping or redirecting. Chain commands like that: -UP (updates FLV file than prints out meta data) COMMANDS
-A Adds tags from -t tags-file -C Cuts file using -i inpoint and -o outpoint -D Debugs file (writes a lot to stdout) -H Helpscreen will be shown -P Prints out meta data to stdout -U Updates FLV with an onMetaTag event SWITCHES
-a Collapse space between cut regions -c Compatibility mode calculates some onMetaTag values differently -key:value Key-value-pair for onMetaData tag (overwrites generated values) -i timestamp Inpoint for cut command in miliseconds -k Keyframe mode slides onCuePoint(navigation) tags added by the add command to nearest keyframe position -l Logs FLV stream reading to stream.log in current directory -n Number of tag to debug -o timestamp Outpoint for cut command in miliseconds -p Preserve mode only updates FLVs that have not been processed before -r Recursion for directory processing -s Simulation mode never writes FLV data to out-path -t path Tagfile (MetaTags written in XML) -v Verbose mode -x XML mode instead of YAML mode SEE ALSO
/usr/share/doc/flvtool2/examples/tags.xml http://www.inlet-media.de/flvtool2 AUTHOR
flvtool2 was written by Norman Timmler <norman.timmler@inlet-media.de> This manual page was written by Todd Troxell <ttroxell@debian.org>, for the Debian project (but may be used by others). August 24, 2007 FLVTOOL2(1)
All times are GMT -4. The time now is 01:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy