Results 1 to 3 of 3
The following script, works perfectly except for the last line you can
see I'm trying to create an iso libriary of sorts i'm tired of looking for my cd's. you ...
- 11-08-2008 #1Just Joined!
- Join Date
- Nov 2008
- Posts
- 2
Bash help Please -- what am i doing wrong
The following script, works perfectly except for the last line you can
see I'm trying to create an iso libriary of sorts i'm tired of looking for my cd's. you see in the last line i'm trying to pass the iso name and description and append to a text file this is where i'm running into problems any help woul be appreciated.
#! /bin/bash
clear
echo "For CD iso press ctrl-c and execute cd2iso"
echo -n "File name for iso image (ie. DvdName.iso):"
read -e isoName
echo -n "Enter File Description:"
read -e desc
echo -n "please wait, reading DVD..."
dd if=/dev/scd0 of=/shares/iso/$isoName
echo $isoName $desc >> /shares/iso/files.txt
- 11-09-2008 #2Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
You only need some quotations.
Also, what't the difference between the two scripts? Wouldn't it be the same exactly for a cd or a dvd? You could use a generic script.Code:#! /bin/bash clear echo "For CD iso press ctrl-c and execute cd2iso" echo -n "File name for iso image (ie. DvdName.iso):" read -e isoName echo -n "Enter File Description:" read -e desc echo -n "please wait, reading DVD..." # Quoting the next variable you ensure this will work # even if the file name has spaces dd if=/dev/scd0 of=/shares/iso/"$isoName" # you need to quote the string if it has spaces in it echo "$isoName $desc" >> /shares/iso/files.txt
- 11-09-2008 #3Just Joined!
- Join Date
- Nov 2008
- Posts
- 2
Thank's yes would work 1 generic script, however small platform pc has a low profile cd-rom, dvd is external and mayt not be attached al the time reason for both scripts and by doing it this way i can create an dvd and a cd iso at the same time. thanks for help really appreciated


Reply With Quote