ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi, i wish this used a gdialog progress bar instead of an infobox:
Code:
#!/bin/bash
# shh-cd-record-v0.1.ksh
# uses cdrecord to create cd.
# if the first file is a wav it will create an audio cd
# else it'll make an iso then make a data cd using that iso.
# depends: cdrecord, mkisofs, gdialog
# this software can be distributed or modified as needed - season to
taste.
# schneidz
# 12.05.2006
pwd=`echo $NAUTILUS_SCRIPT_CURRENT_URI | sed 's/file\:\/\///'`
cd $pwd
if [ `file -bi $1 | awk '{print $2}'` = audio/x-wav ]
then
gdialog --infobox "making audio cd" 200 200
sudo cdrecord dev=0,1,0 -v -dao -useinfo -text $@ speed=6 -eject
gdialog --infobox "audio cd complete" 200 200
else
gdialog --infobox "making iso file" 200 200
mkisofs -r -o shh-cd.iso $@
gdialog --infobox "iso file complete\n starting cdrecord..." 200 200
sudo cdrecord dev=0,1,0 -v shh-cd.iso speed=6 -eject
gdialog --infobox "data cd complete" 200 200
rm shh-cd.iso
fi
Please post your thread once and in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be closed because it is a duplicate of http://www.linuxquestions.org/questi...d.php?t=510861.
the script does run fine but my wishlist includes having use a 'gdialog --guage' instead of an infobox so that it is possible to see how much it has done at any given time.
does anyone know the proper way to re-direct the output of cdrecord to create and update the 'gdialog --guage'?
does anyone know the proper way to re-direct the output of cdrecord to create and update the 'gdialog --guage'?
The "problem" with --gauge is you need to find a way to return a percentage, as in:
What you could do is, instead of using the "gdialog --gauge", just raise the cdrecord verbosity by two ("cdrecord -vv ..."), and let that be the gauge, then use the "gdialog" to mark that the burning process is complete.
It's not pretty, but it's the easiest way to get a gauge onscreen.
the problem with cdrecord (and also with transcade i think) is that it sends its output to file discriptor 2.
is that standard even if it isn't reporting any errors.
either way i haven't had any luck grep-ing out any useful information like current track or estimated file size. (either because it doesn't flush each line or because it delineates lines with an ascii-13 - cr, rather than an ascii-10 - nl)
does anyone have any experience re-directing the output of these two programs ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.