command invocation


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting command invocation
# 1  
Old 03-14-2012
command invocation

Hello,

I've tested something like this: tcpdump -r /tmp/out.out > /tmp/out.ra 2> /dev/null

works fine - there is no status message visible.

if I place in a bash-script this line: $(tcpdump -r /tmp/out.out > /tmp/out.ra 2> /dev/null)

I get status information on executing Smilie. I also tried to assign result to var - doesn't work.

1. How does 'tcpdump' knows if script or user manually typed in command?
2. How to suppress these status lines I get from tcpdump when calling from script?

thanx in advance..
# 2  
Old 03-14-2012
When you are calling tcpdump from your script , just exclude the parenthesis .
only place the below
Code:
tcpdump -r /tmp/out.out > /tmp/out.ra 2> /dev/null

# 3  
Old 03-14-2012
Quote:
Originally Posted by codemaniac
When you are calling tcpdump from your script , just exclude the parenthesis .
Thanks, but it doesn't work like expected.

I get some output lines from 'tcpdump' e.g.: "reading from file /tmp/..., link-type EN10MB (Ethernet)"
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sed: deleting last line prevents '$' address from working in the multi-script invocation

It looks like if matching and deleting the last line confuses 'sed' so it does not recognize '$' address. Consider: sed -e '/^3/d' -e '$ a text' supposed to delete a line starting with '3' and then append 'text' after the last line of input. But, if it is the last line of input which starts... (2 Replies)
Discussion started by: msz59
2 Replies

2. Shell Programming and Scripting

Automatically invocation of unix command

Dear All, I have a directory when i received files by means of FTP, i want to invoke my shell scripts as soon as file hit the directory, if the files hit 10 times then the shell scripts should also get executed 10 times. thanks rajesh (1 Reply)
Discussion started by: guddu_12
1 Replies

3. Shell Programming and Scripting

Is command line invocation of gnome-terminal to run more than one command possible?

Hello, I am trying to learn how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here: #! /bin/bash # #TODO write this for gnome and xterm USAGE=" ______________________________________________ ${0##*/} run... (0 Replies)
Discussion started by: Narnie
0 Replies

4. Red Hat

Problem in REMOTE DESKTOP INVOCATION

Hello sir, I am using VNC package for invoking the remote desktop to and from a FEDORA 8 machine and a WINDOWS XP machine. I have downloaded the VNC for both OSs and run it successfully. 1)When I invoked WINDOWS XP server, the I got it successfully as :-... (0 Replies)
Discussion started by: nsharath
0 Replies

5. AIX

JVM Invocation in AIX 6.1

Hi all, I'm trying to do JVM invocation from C++ in AIX 6.1. So inorder to do that, i'm loading libjvm.a. When i load the libjvm.a from the path where jre is installed (i.e /usr/java5/jre/bin/classic), it loads correctly and the program works correctly. But according to my requirement, the... (0 Replies)
Discussion started by: d_ccc
0 Replies

6. Solaris

xscreensaver invocation location

i have an issue where it appears i'm running version 3.24 of xscreensaver but when the screensaver actually activates it shows version 4.12 on the xscreensaver unlock/lock screen. the node is running solaris 8 which is connected to a server running irix. the node has no .xscreensaver in any of the... (1 Reply)
Discussion started by: nixwins
1 Replies

7. Shell Programming and Scripting

Remote script invocation

Hi, Had this weird issue that need expertise help. Here is the scenario. I have Server A (Unix) and Server B (Windows 2000). I need to invoke a script on Server B from Server A. If it was a windows to windows invocation, I could have done it with WMI. How do I go about it from Unix to... (4 Replies)
Discussion started by: hollysmoke
4 Replies

8. Shell Programming and Scripting

sqlplus invocation

sqlplus -s /nolog <<! set serveroutput on size 100000 @/path_of_my_script exit ! hi, i encountered the above statment in a unix script file and i have some questions, would appreciate if someone can enlighten me. 1. What is the purpose of <<! ? 2. What is the purpose of exit ? does it exit... (4 Replies)
Discussion started by: new2ss
4 Replies
Login or Register to Ask a Question