Sponsored Content
Top Forums Shell Programming and Scripting Perl open(CMD, "cmd |"); buffering problem.. Post 302593563 by thegeek on Friday 27th of January 2012 10:01:18 AM
Old 01-27-2012
Are you sure the 3rd party application writes everything to STDOUT ? Bcoz, you are likely to miss the stuffs printed on STDERR ... But when you execute manually and see output you are likely to miss where it prints .. So try doing with redirection of error to different place & confirm !
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl "system" cmd return values..

perl 5.6.1: when i try a "system" command(with if loops for $?), i get this: child exited with value 1 what is meant by this $? values and what does it meant if it returns 1?.. (0 Replies)
Discussion started by: sekar sundaram
0 Replies

2. Shell Programming and Scripting

assign shell var output of cmd "wc"

how do I feed output of "wc" to a shell script variable "countBcp"? (2 Replies)
Discussion started by: devy
2 Replies

3. Shell Programming and Scripting

Need help on use of "cmd" command in net::Telnet module in PERL

in "cmd" command i want to copy the ouput of the command excuted to a particular file in a directory. How to do this..?? Ex : $telnet->cmd(String => 'allip:acl=a1;',Prompt => '/</'); i want to copy o/p of the command "allip:acl=a1;" in a log file in a particular directory. Plz suggest.. (1 Reply)
Discussion started by: sudhakaryadav
1 Replies

4. Shell Programming and Scripting

passing the output of cmd from "eval" to a variable

Hello, I need help with the eval command. I have been building a lengthy cmd using eval, and I need to create $var from the output of the cmd. Here is what I have. Out=/dfezz1/output.txt Node="'LPAR Info:'" Gr3p0=" |grep" Printc=" prtconf" Output1=" 1>>$Out 0>&1" Cat1="cat... (8 Replies)
Discussion started by: dfezz1
8 Replies

5. Shell Programming and Scripting

Perl script with "chkconfig --list" cmd

Hi everybody; I try to code a script perl to list all services that are active "ON" with a chkconfig -- list the problem is that code list all services which are active or not. #!/usr/bin/perl use strict; use warnings; open(FILE,"-|") || exec "chkconfig --list |grep ON";... (2 Replies)
Discussion started by: bassma
2 Replies

6. Shell Programming and Scripting

cmd || echo "something" - doesn't exit uppon error

Hi guys, I have a shell script where I have the following: for i in ad0 ad1 do gpart create -s gpt $i || echo "Cannot create GPT partition on "$i". Exiting ..." gpart add -s 128 -t freebsd-boot $i || echo "Cannot add freebsd-boot partition on "$i". Exiting ..." gpart add -s 4G -t... (2 Replies)
Discussion started by: da1
2 Replies

7. UNIX for Dummies Questions & Answers

Help about "file" cmd

file /sbin/ifconfig.net-tools /sbin/ifconfig.net-tools: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped Does someone know what's the "x86-64" how it get this? what's the 2.6.16, how it get this and in some... (5 Replies)
Discussion started by: yanglei_fage
5 Replies

8. Shell Programming and Scripting

Using a single "find" cmd to search for multiple file types and output individual files

Hi All, I am new here but I have a scripting question that I can't seem to figure out with the "find" cmd. What I am trying to do is to only have to run a single find cmd parsing the directories and output the different file types to induvidual files and I have been running into problems.... (3 Replies)
Discussion started by: swaters
3 Replies

9. Shell Programming and Scripting

Cmd="grep 'Name:' |awk -F' ' '{print $2}'"

Hi Is it possible to get the below code working.? cmd="grep 'Name:' |awk -F' ' '{print $2}'|xargs -i basename {}" echo $cmd ( rman target / <<EOF1 LIST COPY ; exit EOF1 ) | `$cmd` in nutshell I want to be able to preset cmd as depending on script flow it can be... (2 Replies)
Discussion started by: zam
2 Replies

10. Shell Programming and Scripting

Expect: spawn id exp5 not open while executing "expect "$" { send "sudo su -\r" }"

Hi All, i am trying to ssh to a remote machine and execute certain command to remote machine through script. i am able to ssh but after its getting hung at the promt and after pressing ctrl +d i am gettin the out put as expect: spawn id exp5 not open while executing "expect "$" {... (3 Replies)
Discussion started by: Siddharth shivh
3 Replies
TRACE-CMD(1)															      TRACE-CMD(1)

NAME
trace-cmd - interacts with Ftrace Linux kernel internal tracer SYNOPSIS
trace-cmd COMMAND [OPTIONS] DESCRIPTION
The trace-cmd(1) command interacts with the Ftrace tracer that is built inside the Linux kernel. It interfaces with the Ftrace specific files found in the debugfs file system under the tracing directory. A COMMAND must be specified to tell trace-cmd what to do. COMMANDS
record - record a live trace and write a trace.dat file to the local disk or to the network. report - reads a trace.dat file and converts the binary data to a ASCII text readable format. hist - show a histogram of the events. options - list the plugin options that are available to *report* start - start the tracing without recording to a trace.dat file. stop - stop tracing (only disables recording, overhead of tracer is still in effect) extract - extract the data from the kernel buffer and create a trace.dat file. reset - disables all tracing and gives back the system performance. (clears all data from the kernel buffers) split - splits a trace.dat file into smaller files. list - list the available plugins or events that can be recorded. listen - open up a port to listen for remote tracing connections. restore - restore the data files of a crashed run of trace-cmd record stack - run and display the stack tracer check-events - parse format strings for all trace events and return whether all formats are parseable OPTIONS
-h, --help Display the help text. Other options see the man page for the corresponding command. SEE ALSO
trace-cmd-record(1), trace-cmd-report(1), trace-cmd-hist(1), trace-cmd-start(1), trace-cmd-stop(1), trace-cmd-extract(1), trace-cmd-reset(1), trace-cmd-restore(1), trace-cmd-stack(1), trace-cmd-split(1), trace-cmd-list(1), trace-cmd-listen(1), trace-cmd.dat(5), trace-cmd-check-events(1) AUTHOR
Written by Steven Rostedt, <rostedt@goodmis.org[1]> RESOURCES
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git COPYING
Copyright (C) 2010 Red Hat, Inc. Free use of this software is granted under the terms of the GNU Public License (GPL). NOTES
1. rostedt@goodmis.org mailto:rostedt@goodmis.org 06/11/2014 TRACE-CMD(1)
All times are GMT -4. The time now is 08:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy