Re: [Tomahawk-devs] Tomahawk -f <variable> passed
Brought to you by:
bsmith1180,
dkolbly
|
From: KURUPPANKANDI, S. \(SANDEEP\) <ksa...@al...> - 2008-02-06 06:27:50
|
Hi David, Thanks for your early response. As you have suggested I have tried the below usage oof tomahawk: /usr/local/bin/tomahawk -f $pcap But the result is same.It exists with error *********************** [root@and d]# bash tshell.sh for readingg /home/d/test.pcap : No such file or directory : command not found **************************** The pcap file is stored in the same dir with full permissions. The script executes successfully if I give the full path without the variable.For you reference I'm pasting my entire script here: ********************************************** #!/bin/sh eth0=$(zenity --list --text "Enter first Ethernet controller" --radiolist --column "Select one" --column "Card" TRUE eth0 0FF eth1) eth1=$(zenity --list --text "Enter first Ethernet controller" --radiolist --column "Select one" --column "Card" 0FF eth0 TRUE eth1) repeat=$(zenity --entry --text "Run pcap how many times:" --title "Repeats") Parallel=$(zenity --entry --text "How many pcaps to run in parallel?" --title "Parallel") Address=$(zenity --entry --text "Starting address:" --title "Address") Rate=$(zenity --entry --text "Desire pkt rate in Mbps" --title "Rate") #Debug section zenity --info --text=$pcap # End debug tomahawk -n $parallel -l $repeat -f $pcap -i eth0 -j eth1 -a $address -R $rate -t 10 ************************************************************************ *********************************************** If instead of $pcap if I mention: tomahawk -n $parallel -l $repeat -f /home/d/test.pcap -i eth0 -j eth1 -a $address -R $rate -t 10 The script works fine. Regards -Sandeep -----Original Message----- From: Koconis, David [mailto:dav...@ic...] Sent: Tuesday, February 05, 2008 7:26 PM To: KURUPPANKANDI, SANDEEP (SANDEEP); tom...@li... Subject: RE: [Tomahawk-devs] Tomahawk -f <variable> passed Sandeep It is possible to pass a shell variable to tomahawk as you are trying below. The error message you posted is usually generated by the operating system when it can't find a file. Did you check the following: 1. The tomahawk executable exists, is in the PATH for the user attempting to run the command, and that user has permission to execute it? Some systems do not put the current working directory in the PATH so you need to use the full path to tomahawk (e.g., /usr/local/bin/tomahawk) instead of just tomahawk. Also, in your example below tomahawk is misspelled. Perhaps this is just a typo in your posting. One way to verify all these would be to enter "tomahawk -?". If you get the tomahawk help message, then you should be all set. 2. Does the file /home/d/test.pcap exist and does the user have permission to read it? Does the tomahawk command run if you do not use the variable, but instead use the path? If all of that does not work, please post again with more details about your configuration. David -----Original Message----- From: tom...@li... [mailto:tom...@li...] On Behalf Of KURUPPANKANDI, SANDEEP (SANDEEP) Sent: Tuesday, February 05, 2008 8:39 AM To: tom...@li... Subject: [Tomahawk-devs] Tomahawk -f <variable> passed Hi, I'm facing the following issue: ######################### pcap=$(zenity --file-selection) echo $pcap ## returns the path /home/d/test.pcap tomahwk -l 1 -f $pcap ######################### The execution fails with reason : "No such file or directory" But when I execute the cmd: ************************************** tomahawk -l 1 -f /home/d/test.pcap *************************************** Execution passes successfully. Can you please suggest me whether a variable can be passed as an argument for Tomahawk. If so, why is it failing in my case. Thanks -Sandeep |