From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GYOTs-0006Vw-0B for garchives@archives.gentoo.org; Fri, 13 Oct 2006 14:57:48 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k9DEtfJL015487; Fri, 13 Oct 2006 14:55:41 GMT Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.239]) by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k9DEqwG9031119 for ; Fri, 13 Oct 2006 14:52:59 GMT Received: by wx-out-0506.google.com with SMTP id r21so1219258wxc for ; Fri, 13 Oct 2006 07:52:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=M1/Lxloj7+cWg+eCPyJ+DQDeSsjCgjtcJK3Pjeh8RO9SVyzofkkD0I0dQFQO9996IvcZTx1uJIJbfew+G6SCztUmsh421XhuVgkg7bDGs5TW/jMiWufPL/9A7obXEgZfcGzgdvEg6PfmsqoUJaJNtKy0OkMS0f8pLmKrWPq0Yjo= Received: by 10.90.104.14 with SMTP id b14mr2330729agc; Fri, 13 Oct 2006 07:52:58 -0700 (PDT) Received: by 10.90.54.10 with HTTP; Fri, 13 Oct 2006 07:52:57 -0700 (PDT) Message-ID: <49bf44f10610130752m52d4c2b4qb38428348c1f5e81@mail.gmail.com> Date: Fri, 13 Oct 2006 07:52:57 -0700 From: Grant To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] {OT} dvdrip permissions error, alternative? In-Reply-To: <20061013091453.709ef975@hactar.digimed.co.uk> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <49bf44f10610050957q6a1758apded3e4b5ffce987@mail.gmail.com> <20061010092847.35e25270@hactar.digimed.co.uk> <49bf44f10610100859s64e6d680kd0c9c7f117bcaf2a@mail.gmail.com> <20061010215313.0a0e0397@krikkit.digimed.co.uk> <49bf44f10610110824u5364ad40rac4086c8c90023f@mail.gmail.com> <20061011191217.275714e7@hactar.digimed.co.uk> <49bf44f10610120726p460f8ae1r2e4af733b673858f@mail.gmail.com> <20061012183856.50550030@hactar.digimed.co.uk> <49bf44f10610122255y117f9b60ud15381c0a3e64c72@mail.gmail.com> <20061013091453.709ef975@hactar.digimed.co.uk> X-Archives-Salt: aa2394c0-ecd8-4ad8-b809-f685c40ba31c X-Archives-Hash: 3435b1a353a973a5fe92ee6b43b12d54 > > I'm tweaking that script you wrote. Here's what I have: > > > > #!/bin/bash > > > > echo Enter DVD filename: > > read FILENAME > > mount /dev/cdrom > > TITLE=$(vobcopy -I 2>&1 | awk '/DVD-name:/ {print $3}') > > vobcopy -m || exit > > mkisofs -dvd-video -V $TITLE -o $FILENAME $TITLE || exit > > rm -rf $TITLE > > umount /dev/cdrom > > > > Can you tell me what purpose the "|| exit" portions serve? > > '||' is a logical or. When used to chain commands, as in "cmd1 || cmd2" > it means run cmd1, if that fails run cmd2 (if the first command succeeds > and returns true, the OR will alsays be true so there's no need to run > cmd2). All is does here is exit the script if vobcopy or mkisofs return > an error, because there'd be no point in continuing. Got it. > > Also, how > > can I run the script by typing /path/to/getdvd? I've tried: > > > > chmod +x getdvd > > That should work, assuming you're i the same directory at getdvd. I keep > my scripts in ~/bin, with the x bits set, and have ~/bin in $PATH, so I > don't need to give the path to run them. Here's what I get: grant@system5 ~ $ ls -l -rwxrwxrwx 1 grant grant 386 Oct 12 22:24 getdvd grant@system5 ~ $ getdvd -bash: getdvd: command not found I like the sound of your ~/bin setup. How can I add that to my PATH permanently? Is it 'export PATH=~/bin' ? - Grant -- gentoo-user@gentoo.org mailing list