Sponsored Content
Full Discussion: How to "tee" stderr
Top Forums Shell Programming and Scripting How to "tee" stderr Post 302515754 by stevensw on Wednesday 20th of April 2011 07:43:19 PM
Old 04-20-2011
How to "tee" stderr

In other words, print on both the screen and to a file (minus stdout)? Thanks again in advance
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Adding custom mesg. when redirecting "exec 2>stderr.err" ?

Doubt regarding using "exec" command to redirect the STDERR to a file. e.g I did it this way. mystage.sh #!/bin/sh exec 2>stage.err .... .... cat stage.err mv: cannot move `/root/stage' to a subdirectory of itself, `/root/stage_old/stage' ls: *.zDB: No such file or... (0 Replies)
Discussion started by: snurani
0 Replies

2. Shell Programming and Scripting

Why stderr file descriptor redirection makes ksh's "select" construct hang.

I am trying to use one global declaration --> "exec 2>$ERR" to capture all stderr outputs that may occur anywhere in my script. Then close it at the end of the script using --> "exec 2<&-" I am using KSH on Solaris 8. KSH Version M-11/16/88i If I comment two "exec .." statements in the... (11 Replies)
Discussion started by: kchinnam
11 Replies

3. Shell Programming and Scripting

tar "--totals" writes to stderr not stdout?

I want to use the "--totals" option in GNU tar for some reporting, however I have discovered that it writes the output to stderr not stdout and I would like to know why. This is running from BASH. mkdir /tmp/test touch /tmp/test/foo.file cd /tmp/ tar --totals -clpzf test.tar.gz test 2>... (2 Replies)
Discussion started by: jelloir
2 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. UNIX for Dummies Questions & Answers

Confused over results using "tee" in piped command

First post here, so hopefully all guidelines are followed, and thanks in advance for any replies. I'm working on a shell script(BASH) that processes a csv file and performs various tasks with the data. All is well, except I want to use 'tee' to send output from 'wc' to a file as well as pipe it... (4 Replies)
Discussion started by: jazzmusic
4 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. Homework & Coursework Questions

C++ with Linux - writing a "tee"-like function

Greetings, everyone. 1. The problem statement, all variables and given/known data: I'm running into a problem with my program concerning the actual output it does. When I open the file that gets the output, it contains a large number of hex(?) variables and not what the user wants. The... (0 Replies)
Discussion started by: assignmentoper
0 Replies

8. Shell Programming and Scripting

The pipe not use "tee" to print on the screen for specific function

I have code fragment like { aa bb cc } > $LOG aa bb cc, all call function "ff", I want "ff" to print on the screen,but others do not print on the scree, is there a method? I can't use "tee", becasue tee I meet the write "error" ff() { echo "hello" } (2 Replies)
Discussion started by: yanglei_fage
2 Replies

9. UNIX for Beginners Questions & Answers

Append content using "tee" command

Hi, How to append content into a file using tee command echo " file1 is archived"| tee -a archive.txt echo " file2 is archived"| tee -a archive.txt echo " file3 is archived"| tee -a archive.txt how to append content as new rows in the archive.txt Thanks, Srinadh. (4 Replies)
Discussion started by: srinadhreddy27
4 Replies

10. Shell Programming and Scripting

Mindboggling difference between using "tee" and "/usr/bin/tee" in bash

I'm on Ubuntu 14.04 and I manually updated my coreutils so that "tee" is now on version 8.27 I was running a script using bash where there is some write to pipe error at some point causing the tee command to exit abruptly while the script continues to run. The newer version of tee seems to prevent... (2 Replies)
Discussion started by: stompadon
2 Replies
curs_add_wch(3) 					     Library Functions Manual						   curs_add_wch(3)

NAME
curs_add_wch, add_wch, wadd_wch, mvadd_wch, mvwadd_wch, echo_wchar, wecho_wchar - Add a complex character and rendition to a Curses window and advance the cursor SYNOPSIS
#include <curses.h> int add_wch( const cchar_t *wch ); int wadd_wch( WINDOW *win, const cchar_t *wch ); int mvadd_wch( int y, int x, const cchar_t *wch ); int mvwadd_wch( WINDOW *win, int y, int x, const cchar_t *wch ); int echo_wchar( const cchar_t *wch ); int wecho_wchar( WINDOW *win, const cchar_t *wch ); LIBRARY
Curses Library (libcurses) STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: add_wch, wadd_wch, mvadd_wch, mvwadd_wch, echo_wchar, wecho_wchar: XCURSES4.2 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The add_wch, wadd_wch, mvadd_wch, and mvwadd_wch functions put the complex character wch into the window at the current or specified cursor position, of the current or specified window, and advance the position of the window cursor. These functions perform wrapping and special- character processing as follows: If wch refers to a spacing character, then any previous character at that location is removed; a new char- acter specified by wch is added at that location with rendition specified by wch; then the cursor is advanced to the next spacing character on the screen. If wch refers to a non-spacing character, all previous characters at that location are preserved; the non-spacing charac- ters of wch are added to the spacing complex character, and the rendition specified by wch is ignored. If the character part of wch is a tab, newline, or backspace, the cursor is moved appropriately within the window. A newline also does a clrtoeol before moving. Tabs are considered to be at every eighth column. If the character part of wch is another control character, it is drawn in the ^X notation. Call- ing win_wch after adding a control character does not return the control character, but instead returns the representation of the control character. The echo_wchar function is functionally equivalent to a call to add_wch followed by a call to refresh. Similarly, the wecho_wchar is func- tionally equivalent to a call to wadd_wch followed by a call to wrefresh. The knowledge that only a single character is being output is taken into consideration and, for non-control characters, a considerable performance gain might be seen by using the *echo* functions instead of their equivalents. Line Graphics The following variables may be used to add line-drawing characters to the screen with functions of the add_wch family. When variables are defined for the terminal, the WA_ALTCHARSET bit is turned on [see curs_attr_get(3)]. Otherwise, the default character listed below is stored in the variable. The names chosen are consistent with the VT100 nomenclature. -------------------------------------------------- Name Default Glyph Description -------------------------------------------------- WACS_ULCORNER + upper left-hand corner WACS_LLCORNER + lower left-hand corner WACS_URCORNER + upper right-hand corner WACS_LRCORNER + lower right-hand corner WACS_RTEE + right tee WACS_LTEE + left tee WACS_BTEE + bottom tee WACS_TTEE + top tee WACS_HLINE - horizontal line WACS_VLINE | vertical line WACS_PLUS + plus WACS_S1 - scan line 1 WACS_S9 _ scan line 9 WACS_DIAMOND + diamond WACS_CKBOARD : checker board (stipple) WACS_DEGREE ' degree symbol WACS_PLMINUS # plus/minus WACS_BULLET o bullet WACS_LARROW < arrow pointing left WACS_RARROW > arrow pointing right WACS_DARROW v arrow pointing down WACS_UARROW ^ arrow pointing up WACS_BOARD # board of squares WACS_LANTERN # lantern symbol WACS_BLOCK # solid square block -------------------------------------------------- NOTES
The header file <curses.h> automatically includes the header file <stdio.h>. The add_wch, mvadd_wch, mvwadd_wch, and echo_wchar may be macros. RETURN VALUES
All functions return OK upon successful completion. Otherwise, they return ERR. SEE ALSO
Functions: curses(3), curs_attr_get(3), curs_clear(3), curs_outopts(3), curs_refresh(3), putwc(3) Others: standards(5) curs_add_wch(3)
All times are GMT -4. The time now is 07:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy