Sponsored Content
Top Forums Shell Programming and Scripting Way to save output result of a program into another new file... Post 302412974 by Reboot on Wednesday 14th of April 2010 06:49:31 AM
Old 04-14-2010
Yaa Vgersh is right...
If you are unable to redirect the output with ">" or ">>" then I am a bit sure that the output you are getting is not the stdout.It should be stderror and you can trap it by using "2>" or "2>>" insted of ">" or ">>".

So, use this instad..
 

10 More Discussions You Might Find Interesting

1. Solaris

terminal output - save to file?

I have a window open on my ultra 10 - a terminal window connecting to a server. Is there any way I can log all output to this window to a log file on my ultra 10 ? (2 Replies)
Discussion started by: frustrated1
2 Replies

2. Shell Programming and Scripting

save the HTML result

Hi all, I am displaying my result in HTML format using tables. I want to save the results in file in the same format along with the table only. How do i do that in perl? I have attached the table structure . I want to save like that itself . with regards (2 Replies)
Discussion started by: vanitham
2 Replies

3. Shell Programming and Scripting

let curl output to stdout AND save to a file

hello hackers. i have a curl process running as cgi directly pushing stdout to the client. but i want to additionally save that stream to a file at the same time. any directions madly welcome. thanks in advance (3 Replies)
Discussion started by: scarfake
3 Replies

4. Shell Programming and Scripting

Save cURL verbose output to file or do it like browser "save as.."

hi there ! i have exactly the same problem like this guy here https://www.unix.com/shell-programming-scripting/127668-getting-curl-output-verbose-file.html i am not able to save the curl verbose output.. the sollution in this thread (redirecting stderr to a file) does not work for me.... (0 Replies)
Discussion started by: crabmeat
0 Replies

5. Shell Programming and Scripting

"Time" command and save result in a file.txt

Hi, I'am using "time" to check execution time of some script. Is there any possibility to save time command result into a file ? (2 Replies)
Discussion started by: Physix
2 Replies

6. Shell Programming and Scripting

awk and save result on a different file

Hi, If I type: ls -l *txt | awk '{print $8}' I get the file listing if I am in the directory. If I try to do the same from a job flow, doing also other things, I can't do ls -l directory/*txt | awk '{print $8}' > directory/result.txt or echo ls -l directory/*txt | awk '{print... (8 Replies)
Discussion started by: essemario
8 Replies

7. Shell Programming and Scripting

Save result to a text file

Currently I have a perl code to combine two different files. #! /usr/bin/perl -w use strict; open FP1,"A.txt"; open FP2,"B.txt"; my ($l1,$l2); while(1) { $l1=<FP1>; chomp $l1; $l2=<FP2>; chomp $l2; last unless(defined $l1 or defined $l2); print "$l1 $l2\n"; } close FP2;... (4 Replies)
Discussion started by: Tzeronone
4 Replies

8. Homework & Coursework Questions

Save output into file bash scripting

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Hi there. i have created a program that in the end it will give output like this 1 2 3 4 5 10 9 ... (1 Reply)
Discussion started by: shdin271
1 Replies

9. UNIX for Dummies Questions & Answers

I save the result in a variable

I have friends that this command worked perfectly, but I would like to save the result in a variable, which I have not achieved var=prueba.txt echo $var | cut -d "." -f 1 prueba I need to do this but does not work me salida=echo $var | cut -d "." -f 1 echo "result:$salida" ... (8 Replies)
Discussion started by: tricampeon81
8 Replies

10. Shell Programming and Scripting

Save value from output of Corestat and save in a list for each core

I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below: Core Utilization CoreId %Usr %Sys %Total ------ ----- ----- ------ 5 4.91 0.01 4.92 6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies
snmp_traprcv(8) 					      System Manager's Manual						   snmp_traprcv(8)

NAME
snmp_traprcv - A program that listens for SNMP trap messages and prints any it receives SYNOPSIS
/usr/sbin/snmp_traprcv [-d] [-tcp] [-p port] OPTIONS
Sends a hexadecimal dump of the received packet to stdout. Specifies that the TCP transport be used instead of the UDP transport. If a connection cannot be established, the program silently receives the trap on the standard transport address (UDP 162). Specifies the port number on the local host on which to listen to messages. The default is 162, the well-known SNMP trap port. DESCRIPTION
The snmp_traprcv program listens on the SNMP Trap port specified in the /etc/services file. If no entry exists in the /etc/services file, the program listens on port 162. If any SNMP trap messages arrive, snmp_traprcv prints them to stdout. The program runs until terminated by typing Ctrl/c. RESTRICTIONS
When using the default or well-known port, you must have root privileges in order to run this program. The program may not be able to bind to the default or specified port if other software on the system is already bound to that port. SEE ALSO
Commands: snmpd(8), snmp_request(8), snmp_trapsnd(8) snmp_traprcv(8)
All times are GMT -4. The time now is 02:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy