telnet communication via bash

Need help with C, C++, perl, python, etc?

telnet communication via bash

Postby akraix » 2006-11-20 13:00

hi,

i am searching for a solution to the following problem:

i want a bash script to automatically communicat with the telnet server. i want it to scan several folders for files and if there are any to request them.

Code: Select all
find $folder -maxdepth 1 \( -iname '*.mp3' -o -name '*.ogg' \) -exec echo "scheduler.push {} | telnet localhost 1234" \;


the problem is: the find returns something like "missing argument for -exec". i am wondering what i am doing wrong, as the telnet part works very well once put into a script without the find:

Code: Select all
#!/bin/bash
 (echo "telnet command"
  echo "another telnet command"
  echo "yet another telnet command") \
 | telnet localhost 1234


what the heck am i doing wrong?

thanks for your support,

akraix
akraix
 
Posts: 2
Joined: 2006-11-20 12:26

Return to Programming

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable