Sponsored Content
Top Forums Shell Programming and Scripting How Unix tee to send pipeline output to 2 pipes ? Post 302297794 by jack2 on Sunday 15th of March 2009 03:05:36 PM
Old 03-15-2009
follow-up

thanks to visitors,
any chance to discuss the issue ?

Jack
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix Pipeline help

Does anyone know how to answer this? I have tried many different commands, I just cant get it right..... Search the file 'data' for all of the lines that contain the pattern 'unx122' and put those lines in the file 'matches'. (2 Replies)
Discussion started by: netmaster
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. UNIX for Advanced & Expert Users

tee into 2 named pipes

The following code does not work (zsh, Solaris), but works without the first line (files instead of pipes) :confused: mkfifo p1 p2 echo "Hello" | tee p1 > p2 & paste p1 p2 I would high appreciate any help to fix it. (9 Replies)
Discussion started by: zzol
9 Replies

4. Shell Programming and Scripting

Duplicate output without tee

Hi, Is there anyway to duplicate output without using tee? Let me explain the problem. We are use ssh to login to remote server and save output to a file using tee commands for auditing purposes. When we use vi editor in ssh session, letters get garbled and cant really use vi. Without tee it... (7 Replies)
Discussion started by: eagles1
7 Replies

5. UNIX for Dummies Questions & Answers

tee vs output redirection confusion

ok, suppose i have a file called f1 $ cat f1 this is file1 the quick brown fox jumped over the lazy dog this is file1 who let the dogs out this is unix this is file1 and i have another file f2 $ cat f2 this is file2 the task is to eliminate the repeated lines in f1 and add the... (11 Replies)
Discussion started by: c_d
11 Replies

6. Shell Programming and Scripting

Why cannot have multiple pipes from tee?

why I cannot do this? prog_name | tee logfile | awk /regexp/ | awk /regexp/ I now this is not elegant code, but am intrigued as to why multiple pipes from tee not allowed. (2 Replies)
Discussion started by: euval
2 Replies

7. Shell Programming and Scripting

problem with suppressed output to file using echo and tee command

Hi, When I run the following command in terminal it works. The string TEST is appended to a file silently. echo TEST | tee -a file.txt &>/dev/null However, when I paste this same line to a file, say shell1.sh, and use bourne shell . I run this file in terminal, ./shell1.sh. However I... (1 Reply)
Discussion started by: shahanali
1 Replies

8. Shell Programming and Scripting

how to run a script using cron job and send the output as attachment via e-mail using unix

how to run a script using cron job and send the output as attachment via e-mail using unix. please help me. how my cron job entry should be? As of now my cron job entry is to run the script at specific time, 15 03 * * * /path/sample.sh | mail -s "Logs" email_id In the above entry, what... (8 Replies)
Discussion started by: vidhyaS
8 Replies

9. Homework & Coursework Questions

program to send messages to parent using pipes and select system call

Write a program using select, which will create some number of child processes that continuously send text messages to the parent process using pipes. Each child has its own pipe that it uses to communicate with the parent. The parent uses select () to decide what pipes should be processed to... (1 Reply)
Discussion started by: ripssingh
1 Replies

10. Shell Programming and Scripting

Automatically send stdout and stderror to a file as well as to the screen, but without using tee

Hi, I've been using the following commands in my automated scripts, to ensure that all text output is sent to a log file instead of to the screen: exec 1>>$SCRIPT_LOG_FILE exec 2>>$SCRIPT_LOG_FILE However, I've now discovered that the system used for automating the script executions... (4 Replies)
Discussion started by: confusedAdmin
4 Replies
pid(n)                                                         Tcl Built-In Commands                                                        pid(n)

__________________________________________________________________________________________________________________________________________________

NAME
pid - Retrieve process identifiers SYNOPSIS
pid ?fileId? _________________________________________________________________ DESCRIPTION
If the fileId argument is given then it should normally refer to a process pipeline created with the open command. In this case the pid command will return a list whose elements are the process identifiers of all the processes in the pipeline, in order. The list will be empty if fileId refers to an open file that is not a process pipeline. If no fileId argument is given then pid returns the process identi- fier of the current process. All process identifiers are returned as decimal strings. EXAMPLE
Print process information about the processes in a pipeline using the SysV ps program before reading the output of that pipeline: set pipeline [open "| zcat somefile.gz | grep foobar | sort -u"] # Print process information exec ps -fp [pid $pipeline] >@stdout # Print a separator and then the output of the pipeline puts [string repeat - 70] puts [read $pipeline] close $pipeline SEE ALSO
exec(n), open(n) KEYWORDS
file, pipeline, process identifier Tcl 7.0 pid(n)
All times are GMT -4. The time now is 11:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy