From owner-freebsd-questions@FreeBSD.ORG Sun Feb 20 15:20:55 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C8BD16A4CE for ; Sun, 20 Feb 2005 15:20:55 +0000 (GMT) Received: from mail-core.space2u.com (mail-core.space2u.com [62.20.1.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4978F43D41 for ; Sun, 20 Feb 2005 15:20:54 +0000 (GMT) (envelope-from jd@dagerot.com) Received: from localhost (www-core.space2u.com [62.20.1.180]) by mail-core.space2u.com (8.13.3/8.13.2) with ESMTP id j1KFKoup004850 for ; Sun, 20 Feb 2005 16:20:50 +0100 Date: Sun, 20 Feb 2005 16:20:50 +0100 Message-Id: <200502201520.j1KFKoup004850@mail-core.space2u.com> MIME-Version: 1.0 From: "Joachim Dagerot" To: freebsd-questions@freebsd.org Cc: Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Subject: Bash script programming. Sending commands to a 'screen' session X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2005 15:20:55 -0000 I just accidentily wiped one of my script folders. Really no big deal, I'm not doing multiK scripts. But I had one nice script laying around. It created an additional window in a named screen session and started a bittorrentheadless session within. I do remember that it took me some days to solve this last time, and I have only been sitting three hours so far. (No, I don't recall the exact syntax). I'm struggeling with this script now: #!/bin/bash echo "Starting download: $1" screen -r p2pA -X screen "nice -n 20 /usr/local/BitTorrent-3.4.2/btdownloadheadless.py --max_uploads 4 \"$1\"" But it just don't do anything useful. If I run that line from prompt, replacing $1 with a filename, then it works. It's surely something to do with citationmarks around arguments etc. but I just don't see it.