Sponsored Content
Top Forums Shell Programming and Scripting How to detect whethere the CD is R or RW Post 302218119 by BMDan on Thursday 24th of July 2008 12:03:33 PM
Old 07-24-2008
Something like:

Code:
#Add any needed device specifications to the line below; by default, it'll use /dev/cdrom.
cdrecord -atip | grep -F 'Is erasable'
if [ $? -eq 0 ]; then
    #cdrecord blank option goes here
else
    #cdrecord CD-R option goes here
fi

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to detect process

Dear Sir, Now I use oracle database on AIX server and found some user use iligal program such as development tool logon to my database. I want to detect the process of illegal program and kill it. Could you please suggest me to make detect process. Thank you very much Pkanonwe. (2 Replies)
Discussion started by: pkanonwe
2 Replies

2. Shell Programming and Scripting

xterm detect

i have this script that launches multiple xterm sessionon a CDE. i would like to test the xterm so that when i execute the script using an ordinary terminal it will detect that it will unable to launch the xterm and execute other script instead. i tried using trap and exit status. maybe i am... (2 Replies)
Discussion started by: inquirer
2 Replies

3. UNIX for Advanced & Expert Users

How to detect OS is SLES 10 or not

Hi, I would like to programmatically find if given OS is SLES 10 / RHEL 3/.RHEL 4/RHEL5 etc .. For this do we have any library call/sys call? Or should we use any sys. structure which would give me detailed info. Share me if you have any pointers. Thanks in advance - Krishna (1 Reply)
Discussion started by: krishnamurthig
1 Replies

4. Shell Programming and Scripting

Detect changes in a file

Hi all Just curious , is it possible to detect changes in a file and sent to email . For ex: demo.conf I would like to receive an email everytime a particular file(demo.conf) changes and the content added/removed and who did the change (userid). Is it possible. Thanks CK (4 Replies)
Discussion started by: coolkid
4 Replies

5. Shell Programming and Scripting

detect F5 is pressed

Hello friends, I want to write a shell script in bash shell . Working for the script is to detect any key pressed and disply on screen as "you have pressed: " For example if user pressed F5 then a messaged has to be displayed as "you have pressed F5. Thank you. (4 Replies)
Discussion started by: pradeepreddy
4 Replies

6. Programming

can-not detect TCP disconnects well

Hello everyone. Thanks for reading. I am using Ubuntu 7.04 to experience this problem: I have written my own programs that communicate to eachother and I am having a hard time detecting a TCP socket disconnect when the remote side's computer has a power-failure (for example). On the computer... (6 Replies)
Discussion started by: pjwhite
6 Replies

7. Red Hat

Detect the lun

Hi, Is there command to detect the newly added LUN is linux box. I tried with below commands, but that doesn't work out. fdisk -l, fdisk -l | grep Disk pvscan (5 Replies)
Discussion started by: gsiva
5 Replies

8. Shell Programming and Scripting

Detect changes to crontab

Dear All, My server is running crontabs of 4 different users. I want to develop a script that whenever a particular change occurs in a crontab , it is detected and the particular change is noted into a file. Kindly let me know of suggestions on how it can be achieved. My algo would be: ... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies

9. Shell Programming and Scripting

Detect OS

whats the equivalent of detect OS in perl with an if then ? platform='uname' if ]; then alias ls='ls --color=auto' elif ]; then alias ls='ls -G' fi In perl I see perl -Mstrict -MEnglish -E 'say $OSNAME' or print "$^O" Please use CODE tags as required by... (1 Reply)
Discussion started by: nixguynj
1 Replies
mpc123(1)						      General Commands Manual							 mpc123(1)

NAME
mpc123 - your handy Musepack audio player SYNOPSIS
mpc123 [options] file(s) DESCRIPTION
mpc123 is a command-line player for the Musepack audio compression format. mpc123 reads mpc audio files and decodes them to the devices specified on the command line. During playback, you can pass to the next playlist element (or a random one if one of the -z and -Z options were used, see below) by send- ing SIGINT to the process, thus usually pressing ^C will act as a "next-button" for the player. OPTIONS
--gain N, -g N Set gain (audio volume) to N (0-100 inclusive, default 100, 0 mutes sound) -o driver Set output devicetype to driver; possible drivers include: oss Linux Open Sound System alsa Advanced Linux Sound Architecture alsa09 ALSA version 0.9 and newer (you should really be using this) esd Enlightenment sound daemon arts Analog Real Time System (kde sound daemon) null Debugging output target --audiodevice dev, -a dev Use dev for audio-out; If not specified, the program tries to pick some sane defaults, based on the used audio output driver. Common devices include: /dev/dsp or /dev/dsp1 for oss output default or hw:0 for alsa09 output --au filename.au, -u filename.au Use au file filename.au for output --cdr filename.cdr, -c filename.cdr Use raw file filename.cdr for output (this can be used directly with cdrecord's -audio option) --wav filename.wav, -w filename.wav Use wave file filename.wav for output --list file, -@ file Use playlist file as list of Musepack files; The playlist format is simple: one file per line. You can easily generate a playlist for mpc123 with the find(1) command: find /path/to/musicroot -iname *.mpc -fprint file --random, -Z Play files randomly until interrupted --shuffle, -z Shuffle list of files before playing --verbose, -v Increase verbosity (default verbosity is 0), the more -v, the more verbose mpc123 becomes --quiet, -q Reset verbosity to 0 (no title or boilerplate); this is the default --help, -h Print the help screen, with some brief usage information AUTHOR
This manual page was written by Daniele Sempione <scrows at oziosi.org>; Fernando Vezzosi <fvezzosi at masobit.net> made some edits January 2006 mpc123(1)
All times are GMT -4. The time now is 03:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy