Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 11-03-2013, 03:52 PM   #1
LQ Newbie
Registered: Sep 2012
Posts: 6

Rep: Reputation: Disabled
Get invalid volume specification from shell script

I am trying to make a shell script to control volume on the system.

pactl -- set-sink-volume 0 -10%

that line works perfect from the command line. However if I create a shell script I get "invalid volume specification" when I run the script. The script has only one line in it which is shown above. I am not experienced in shell scripts so if I am doing something wrong, correct me. I called the script file and execute using the command sh I am so close to finishing this project and this is what stands in my way. PLEASE HELP.

I have changed the relative volume setting to a specific one and get same error.
Old 11-03-2013, 05:30 PM   #2
Senior Member
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM 17.1
Posts: 4,996
Blog Entries: 9

Rep: Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211
pactl \-\- set-sink-volume 0 \-10\%

P.S. Which "shell"?
Old 11-03-2013, 09:36 PM   #3
LQ Newbie
Registered: Sep 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
no joy

I tried your suggestion but still same problem. This is on Fedora 18. I was so hoping your thought would work. DARN THE LUCK


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I disable a usb port using a shell script? I'm getting Invalid argument errs abefroman Linux - Hardware 1 07-29-2013 05:45 PM
tar multiple volume archive - volume script RGummi Linux - General 2 08-31-2006 05:08 PM
Question about path specification in program/script code R00ts Programming 2 05-11-2006 05:07 AM
Invalid Unicode on DVD Disc/Volume Label DraconianTimes Linux - Software 2 11-30-2003 03:28 PM

All times are GMT -5. The time now is 05:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration