Results 1 to 3 of 3
Hey guys, So this past weekend I did a server migration to a new box. Im trying to write a simple script that asks what file you want to burn ...
- 11-23-2009 #1
simple dvd script question
Hey guys, So this past weekend I did a server migration to a new box. Im trying to write a simple script that asks what file you want to burn to a dvd, then burns it to disc. something similar to this:
the problem is when you type in the location of the dvd file, I'd like to be able to use TAB to complete the path. Unfortunately this does not work. Does anyone know how to make it so you can use TAB to complete paths in scripts? thanks!Code:#!/bin/bash echo -e "Please make sure there is a DVD in the drive and type in the location of the .avi file: " read file growisofs -use-the-force-luke=dao -dvd-compat -J -R -l -f -Z /dev/dvdwriter -speed=6 $file
I can imagine a perfect world, a world without hate, a world without war. Then I can imagine us attacking that world because they\'d never expect it.
- 11-23-2009 #2
Hi,
you could try this:
$1 is set by the first option of the script.Code:#!/bin/bash growisofs -use-the-force-luke=dao -dvd-compat -J -R -l -f -Z /dev/dvdwriter -speed=6 $1
if you name the previous script fry (and have a file called Somefle.avi) than you can use the TAB completion feature in the shell:
givesCode:$ fry Som<TAB>
Code:$ fry Somefile.avi
- 11-23-2009 #3
ahh, I cant beleive I didnt think about that! Thanks alot I really appreciate it!
I can imagine a perfect world, a world without hate, a world without war. Then I can imagine us attacking that world because they\'d never expect it.


Reply With Quote