hi,
i wat to get the output of a grep command in a file. but when i am trying out the same grep command in the unix prompt its working fine.. i am getting the output properly.. but when i am writing the same command inside my shell script , its just creating a new output file with no contents... (11 Replies)
Hi folks,
Please advise which command/command line shall I run;
1) to display the command and its output on console
2) simultaneous to save the command and its output on a file
I tried tee command as follows;
$ ps aux | grep mysql | tee /path/to/output.txt
It displayed the... (7 Replies)
How to redirect the output to multiple files without putting on console
I tried tee but it writes to STDOUT , which I do not want.
Test.sh
------------------
#!/bin/ksh
echo "Hello " tee -a file1 file2
----------------------------
$>./Test.sh
$>
Expected output:
-------------------... (2 Replies)
Is there a utility built into Solaris that will allow me to see console messages from a tty?
I've done a search and see that this is possible through software like ILOM, but I'm looking for a method to do this with built in utilities.
For example, on AIX, I can use swcons `tty` (6 Replies)
Hi Everyone,
Can anyone please tell me, how can I redirect the grep command output to same file. I am trying with below command but my original file contains no data after executing the command.
$grep pattern file1 > file1
Kind Regards,
Eswar (5 Replies)
When i use the command to check the preview of the filesets to be installed using CLI
# When using this commad 'm able to see all Preview view of the filesets to be installed
installp -apgX -d "." all
# When I redirected the same output to a file 'm able to see only half the details... (1 Reply)
I have set up a bash script to run a long list of things that I need to time. I would like to redirect the output of time to a file. I have set it up like,
echo "Runtimes for servlet 4, 100K structures" > test_times.txt
echo "" >> test_times.txt
echo "runs where N=10" >> test_times.txt
echo... (7 Replies)
(/home/user1)-> more script.sh
#!/bin/ksh
( echo open devicename
sleep 3;
echo user;
sleep 2;
echo password;
sleep 2;
echo "/info/dump"; ---------> This needs to redirect to a file .Can be number of pages
sleep 2;
echo "exit" ) | telnet
Please use code tags next time for... (2 Replies)
Hi,
I'd like to redirect the STDOUT output from my script to a file and simultaneously display it at a console.
I've tried this command:
myscript.sh | tail -f
However, it doesn't end after the script finishes running
I've also tried this:
myscript.sh | tee ~/results.txt
But it writes... (3 Replies)
I'm trying to find out what happened to the rogue game that apt-get told me it installed, so I thought I would find the file. I went to the root and entered:
find -name "rog*.*"
I get a large number of lines saying my access is denied in various directories. I figure I'll practice my Unix... (14 Replies)
Discussion started by: arghvark
14 Replies
LEARN ABOUT DEBIAN
ng_tee
NG_TEE(4) BSD Kernel Interfaces Manual NG_TEE(4)NAME
ng_tee -- netgraph ``tee'' node type
SYNOPSIS
#include <sys/types.h>
#include <netgraph/ng_tee.h>
DESCRIPTION
The tee node type has a purpose similar to the tee(1) command. Tee nodes are useful for debugging or ``snooping'' on a connection between
two netgraph nodes. Tee nodes have four hooks, right, left, right2left, and left2right. All data received on right is sent unmodified to
both hooks left and right2left. Similarly, all data received on left is sent unmodified to both right and left2right.
Packets may also be received on right2left and left2right; if so, they are forwarded unchanged out hooks right and left, respectively.
HOOKS
This node type supports the following hooks:
right The connection to the node on the right.
left The connection to the node on the left.
right2left Tap for right to left traffic.
left2right Tap for left to right traffic.
CONTROL MESSAGES
This node type supports the generic control messages, plus the following.
NGM_TEE_GET_STATS
Get statistics, returned as a struct ng_tee_stats.
NGM_TEE_CLR_STATS
Clear statistics.
SHUTDOWN
This node shuts down upon receipt of an NGM_SHUTDOWN control message, or when all hooks have been disconnected. If both right and left hooks
are present, node removes itself from the chain gently, connecting right and left together.
SEE ALSO tee(1), netgraph(4), ngctl(8)HISTORY
The ng_tee node type was implemented in FreeBSD 4.0.
AUTHORS
Julian Elischer <julian@FreeBSD.org>
BSD May 28, 2004 BSD