Skip to main content
deleted 1 character in body
Source Link
Salem Masoud
  • 233
  • 1
  • 3
  • 8

I have the following script

#!/bin/bash
for (( c=0; c<=9; c++ ))
do  
    ssh -t 192.168.30.11 "tshark -i eth1 -f 'src host 192.168.31.10 and tcp' -w shared_folder/results/bbb_var_4_exp_pcaps/capture-output-$c.pcap -a duration:205" &
    python ~/shared_folder/tapas/play.py -u http://192.168.31.10/video-content/mm_videos/bbb_var_4/bbb_var_4.m3u8 -m fake -l my-exp-logs/bbb_var_4_exp_logs &
    sleep 210
done

I am trying to run the ssh command on the background do the second command python does not need the first command to finish. but when I add & to the end of the ssh command line it just hangs.

Any ideas?

I have the following script

#!/bin/bash
for (( c=0; c<=9; c++ ))
do  
    ssh -t 192.168.30.11 "tshark -i eth1 -f 'src host 192.168.31.10 and tcp' -w shared_folder/results/bbb_var_4_exp_pcaps/capture-output-$c.pcap -a duration:205" &
    python ~/shared_folder/tapas/play.py -u http://192.168.31.10/video-content/mm_videos/bbb_var_4/bbb_var_4.m3u8 -m fake -l my-exp-logs/bbb_var_4_exp_logs &
    sleep 210
done

I am trying to run the ssh command on the background do the second command python does not need the first command to finish. but when I add & to the end of the ssh command line it just hangs.

Any ideas?

I have the following script

#!/bin/bash
for (( c=0; c<=9; c++ ))
do  
    ssh -t 192.168.30.11 "tshark -i eth1 -f 'src host 192.168.31.10 and tcp' -w shared_folder/results/bbb_var_4_exp_pcaps/capture-output-$c.pcap -a duration:205" &
    python ~/shared_folder/tapas/play.py -u http://192.168.31.10/video-content/mm_videos/bbb_var_4/bbb_var_4.m3u8 -m fake -l my-exp-logs/bbb_var_4_exp_logs 
    sleep 210
done

I am trying to run the ssh command on the background do the second command python does not need the first command to finish. but when I add & to the end of the ssh command line it just hangs.

Any ideas?

added 1 character in body
Source Link
Salem Masoud
  • 233
  • 1
  • 3
  • 8

I have the following script

#!/bin/bash
for (( c=0; c<=9; c++ ))
do  
    ssh -t 192.168.30.11 "tshark -i eth1 -f 'src host 192.168.31.10 and tcp' -w shared_folder/results/bbb_var_4_exp_pcaps/capture-output-$c.pcap -a duration:205" &
    python ~/shared_folder/tapas/play.py -u http://192.168.31.10/video-content/mm_videos/bbb_var_4/bbb_var_4.m3u8 -m fake -l my-exp-logs/bbb_var_4_exp_logs &
    sleep 210
done

I am trying to run the ssh command on the background do the second command python does not need the first command to finish. but when I add & to the end of the ssh command line it just hangs.

Any ideaideas?

I have the following script

#!/bin/bash
for (( c=0; c<=9; c++ ))
do  
    ssh -t 192.168.30.11 "tshark -i eth1 -f 'src host 192.168.31.10 and tcp' -w shared_folder/results/bbb_var_4_exp_pcaps/capture-output-$c.pcap -a duration:205" &
    python ~/shared_folder/tapas/play.py -u http://192.168.31.10/video-content/mm_videos/bbb_var_4/bbb_var_4.m3u8 -m fake -l my-exp-logs/bbb_var_4_exp_logs &
    sleep 210
done

I am trying to run the ssh command on the background do the second command python does not need the first command to finish. but when I add & to the end of the ssh command line it just hangs.

Any idea?

I have the following script

#!/bin/bash
for (( c=0; c<=9; c++ ))
do  
    ssh -t 192.168.30.11 "tshark -i eth1 -f 'src host 192.168.31.10 and tcp' -w shared_folder/results/bbb_var_4_exp_pcaps/capture-output-$c.pcap -a duration:205" &
    python ~/shared_folder/tapas/play.py -u http://192.168.31.10/video-content/mm_videos/bbb_var_4/bbb_var_4.m3u8 -m fake -l my-exp-logs/bbb_var_4_exp_logs &
    sleep 210
done

I am trying to run the ssh command on the background do the second command python does not need the first command to finish. but when I add & to the end of the ssh command line it just hangs.

Any ideas?

Source Link
Salem Masoud
  • 233
  • 1
  • 3
  • 8

running ssh command with another command at the same time in a bash script

I have the following script

#!/bin/bash
for (( c=0; c<=9; c++ ))
do  
    ssh -t 192.168.30.11 "tshark -i eth1 -f 'src host 192.168.31.10 and tcp' -w shared_folder/results/bbb_var_4_exp_pcaps/capture-output-$c.pcap -a duration:205" &
    python ~/shared_folder/tapas/play.py -u http://192.168.31.10/video-content/mm_videos/bbb_var_4/bbb_var_4.m3u8 -m fake -l my-exp-logs/bbb_var_4_exp_logs &
    sleep 210
done

I am trying to run the ssh command on the background do the second command python does not need the first command to finish. but when I add & to the end of the ssh command line it just hangs.

Any idea?