CD_DA TRACK AUDIO AUDIOFILE "01.wav" 0 TRACK AUDIO AUDIOFILE "02.wav" 0 TRACK AUDIO AUDIOFILE "03.wav" 0 TRACK AUDIO AUDIOFILE "04.wav" 0
then invoke cdrdao as such:
cdrdao write --driver generic-mmc cdtmpdir.toc
CD_DA TRACK AUDIO AUDIOFILE "01.wav" 0 TRACK AUDIO AUDIOFILE "02.wav" 0 TRACK AUDIO AUDIOFILE "03.wav" 0 TRACK AUDIO AUDIOFILE "04.wav" 0
cdrdao write --driver generic-mmc cdtmpdir.toc
find /path/to/start -name "filename" -exec rm {} \;
1. Install the kernel-source package(with softwaremanager) if not already done 2. Open a konsole as root and type: cd /usr/src/linux 3. cleanup the directory with command: make mrproper 3. Configure the kernel: make xconfigure 4. Now activate ACPI in the section General Setup, activate all modules if possibvle mark with "y" y means to built into kernel, not as module. Don't change anything else in the kernel config otherwise you have to do some more things that I don't explain now. 5. Save and exit 6. Compile: make dep && make bzImage && make modules && make modules_install After that is done do the following: cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.19-acpi cp /usr/src/linux/System.map /boot/System.map-2.4.19-acpi 7. Now you just need to either use drakboot to add that kernel to lilo.conf or just add the lines for this kernel to lilo.conf manually with an editor of your choice for example you would add: image=/boot/vmlinuz-2.4.19-acpi label=2.4.19-acpi root=/dev/hda7 initrd=/boot/initrd-2.4.19-16mdk.img append="noquiet devfs=mount hdc=ide-scsi" vga=791 read-only 8. Now you rerun lilo with command, as root: /sbin/lilo 9. Don't forget to install the acpid script with command: urpmi acpid you can also do that with softwaremanager(rpmdrake) 10. Run command: drakxservices disable the apm daemon and enable acpid 11. Reboot select the kernel mared as 2.4.19-acpi test if everything works fine if it does you can make it your default kernel.
SELECT field, count( field ) FROM table GROUP BY field HAVING Count( field ) > 1 LIMIT 0 , 30
for (( i = 0 ; i <= 5; i++ )) do echo "Welcome $i times" done
# loop thru the categories and count all prods underneath my $prodcount=0; my $cat_loop_q = "SELECT category_code,category_parent FROM $categories"; my $sth = &db_query($cat_loop_q); while (my $ref = $sth->fetchrow_arrayref) { $prodcount = &countTree($$ref[0]); my $update_q = "UPDATE $categories SET count = '$prodcount' WHERE category_code = '$$ref[0]'"; my $update = &db_query($update_q); $prodcount=0; } sub countTree { my ($root) = shift; my $drill_q = "SELECT category_code FROM $categories WHERE category_parent = '$root'"; #print "$drill_q\n"; my $sth = &db_query($drill_q); my $rc = $sth->rows; if ($rc>0) { while (my $ref = $sth->fetchrow_arrayref) { &countTree($$ref[0]); } } my $sql_q = "SELECT a.category_name, a.category_code, a.category_parent, COUNT(DISTINCT b.skuid) FROM $categories AS a, $products_to_categories AS b WHERE a.category_code=b.category_code AND a.category_code='$root' GROUP BY a.id"; my $sth = &db_query($sql_q); my ($name,$parent,$code,$count); while (my $ref = $sth->fetchrow_arrayref) { $name=$$ref[0]; $code=$$ref[1]; $parent=$$ref[2]; $count=$$ref[3]; $prodcount=$prodcount+$count; } return($prodcount); }
SELECT a.category_name AS parent_name, b.category_name AS child_name, a.category_code as a_category_code, a.category_parent AS a_category_parent, b.category_code as b_category_code, b.category_parent AS b_category_parent FROM categories_raw_loop AS a, categories_raw_loop AS b WHERE a.category_code = b.category_parent ORDER BY a.category_code;
LOAD DATA LOCAL INFILE "/full/path/file" INTO TABLE [table] FIELDS TERMINATED BY ';' (col1,col2);
SELECT count( unoptioned_skuid ) as count , unoptioned_skuid as skuid FROM orders_products GROUP BY unoptioned_skuid ORDER BY count DESC
tar -czvf /home/site/backup.tar.gz /home/site/cgi-bin --exclude=mysubdir
tar -r --file=/home/site/backup.tar /home/site/more_stuff
gzip /home/site/backup.tar
file_size=$(ls -l "path/file" | awk '{ print $5 }') echo $file_size
find . -name '*.html' -maxdepth 1 | xargs perl -pi -e 's/search_text/replace_text/g;'
#! /bin/bash # # M3U CDWRITER # 10/16/2003 # rory o'connor - rory | thewhiteroom.com # # writes CDs from .m3u files created with XMMS # Tracks are written in the order they appear in # the .m3u file. # # prerequisites: # lame # normalize # cdrecord # m3u playlist no longer than 1:19 (for 80min cd) # ######configuration # "dev" parameter to cdrecord. if you don't know, # try 'cdrecord --scanbus' on the cmd line dev=1,2,0 # # speed of the cdrecorder speed=12 # # the temp directory for .wav files # THIS SCRIPT CREATES AND REMOVES IT holding=$HOME/cdtmpdir # no trailing slash file="" m3u="" zero=0 count=0 if [ -d $holding ]; then echo "CD temp ($holding) cannot already exist...exiting."; exit; fi echo "Please enter the path and filename of the .m3u file you want to write to CD relative to $HOME:" read m3u file=$HOME/$m3u if [ -f $file ] then # make the temp directory mkdir $holding for file in $file do grep -v '^#' $file | while read line do count=$[ $count + 1 ] name=`echo $line | awk -F"*" '{print $1}'` echo "$name" # check the length of $count length=`echo "$count" | wc -c | cut -c1-8` length=$[ $length - 1 ] # fix the count to a 2-digit number if [ $length = 1 ]; then newcount=$zero$count else newcount=$count fi # write wav file to our holding pen lame --decode "$name" $holding/$newcount.wav done done # normalize the wav files normalize -m $holding/*.wav # burn the CD cdrecord dev=$dev -eject speed=$speed -pad -audio $holding/*.wav # remove the files for file in `ls -1 $holding` do rm -f $holding/$file done rmdir $holding else echo "file does not exist." fi