Bash - proper way to append variable to stderr


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bash - proper way to append variable to stderr
# 8  
Old 09-18-2017
I think the question was about post-processing stderr.
This is not trivial.
The command 2> >( post-command > error.log ) is one method.
There is also the classic { command 2>&1 >&3 | post-command > error.log; } 3>&1 method.
This User Gave Thanks to MadeInGermany For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Redirect string from bash stderr to user stdin

Hi there, I need to execute a command in the bash. The program prints some standard (output and) error and then wants the user to choose one of several options and type the according input. I am trying to solve this issue in a bash script but also running into some circular dependency. How can I... (7 Replies)
Discussion started by: fredestet
7 Replies

2. Shell Programming and Scripting

Proper distribution of cards in terminal based crazy8's game in bash script

When I run the following script at the bottom it say cards remaining=44...It should be=35. Can anyone tell me what I'm doing wrong. I've spent hours trying to get this to work and I can't go any further until this part works. thank you in advance Cogiz #!/bin/bash # Date="November, 2016" #... (2 Replies)
Discussion started by: cogiz
2 Replies

3. Shell Programming and Scripting

[bash] how is proper way to validate user input

hi all, i have a script that need user input provide all variables that needed to complete a job. this is my current script: echo "type file source and it full path :" read INPUTFILE if || ; then echo "ERROR: you didn't enter a file source or file source is not... (2 Replies)
Discussion started by: makan
2 Replies

4. Shell Programming and Scripting

How to redirect the STDERR to a variable in perl?

in my perl script i tried the below statement $result = `cleartool rmstream -f $s1 1> /dev/null`; so as to redirect then error messages,when i print the $result ,it seems to be Null. (4 Replies)
Discussion started by: ram_unx
4 Replies

5. Shell Programming and Scripting

ssh, bash, and /dev/stderr: no such device

Hello, When I run the following program: ssh 192.168.1.4 bash -l <<EOF > echo foo >/dev/stderr > EOF I get the following confusing error. bash: line 1: /dev/stderr: No such device or address Does anyone know why and how to fix it? I'm capturing stdout in a variable, but I... (2 Replies)
Discussion started by: brsett
2 Replies

6. Shell Programming and Scripting

Append stderr

Hi everybody. I was used to redirect stderr to a file in this way, calling a generic script:./myScript &> output.logBut now I need something more sophisticated...Inside a bash script I launch an executable in this way:${command} >> "${globalLogFile}"So I redirect the stdout into globalLogFile.... (14 Replies)
Discussion started by: canduc17
14 Replies

7. Shell Programming and Scripting

Can STDERR be saved to a variable

Guys i'm trying to save STDERR to a variable for a portion of my ksh script on solaris. I know i can create redirects to files as such: exec 4>/tmp/lava print "This will be saved to /tmp/lava and not screen"; >&4 print "This will be seen on screen" >&2 I want to save the STDOUT of a... (4 Replies)
Discussion started by: lavascript
4 Replies

8. Shell Programming and Scripting

Redirecting STDERR to a file from within a bash script

I am trying to redirect the output from stderr to a log file from within a bash script. the script is to long to add 2> $logfile to the end of each command. I have been trying to do it with the command exec 2> $logfile This mostly works. Unfortunately, when a read command requires that anything be... (5 Replies)
Discussion started by: vockleya
5 Replies

9. Shell Programming and Scripting

can't redirect stderr in bash

Consider: #!/bin/sh #this is a shell script in sh (bourne) grep missingfile 2>errout.txt It works from the command line, but keeps producing errors from the script. So how do I redirect in a bash shell...or bourne? (3 Replies)
Discussion started by: lumix
3 Replies

10. Shell Programming and Scripting

redirect stderr to dev/null in bash env.

Working in a bash environment, in the following example, how do I direct the error message that putting in an invalid flag (-j for example) would normally produce to dev/null? while getopts "abcd" opt do case "$opt" in i) a etc ;; r) b etc ;; f) c etc ;; v) d... (7 Replies)
Discussion started by: Sniper Pixie
7 Replies
Login or Register to Ask a Question
yodlpost(1)						    Your Own Document Language						       yodlpost(1)

NAME
yodlpost - Yodl post-processor SYNOPSIS
yodlpost [options] index yodlout [out] DESCRIPTION
The Yodl post processor is used to solve references into the converted text, and to split (where appropriate) the converted Yodl text in parts. Some conversions do not require post-processing, such as LaTeX, but most do. Therefore, in most cases a Yodl conversion consists of two phases: o First, yodl(1) is called, producing a raw output file and an associated index file; o Then, yodlpost(1) is called, converting these two files into a final document. Normally, yodl2...(1) scripts are used to perform complete Yodl conversions. OPTIONS
-x ext: extension of the out-s if different from out's extension itself. If omitted, and out has no extension, ypp (Yodl Post Processor) is used. SEE ALSO
yodlstriproff(1), yodl(1), yodlbuiltins(7), yodlconverters(1), yodlletter(7), yodlmacros(7), yodlmanpage(7), yodlverbinsert(1). BUGS
- AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl), yodl_3.00.0.tar.gz 1996-2010 yodlpost(1)